Publishers.TryContainsWhere

μ œλ„€λ¦­ ꡬ쑰체 | μ—λŸ¬λ₯Ό λ˜μ§€λŠ” 쑰건 ν΄λ‘œμ €λ₯Ό λ§Œμ‘±ν•˜λŠ” μš”μ†Œλ₯Ό μ „λ‹¬λ°›λŠλƒμ— 따라 λΆˆλ¦¬μ–Έ 값을 λ°©μΆœν•˜λŠ” Publisher

μ΄λ‹ˆμ…œλΌμ΄μ €λŠ” 두 개의 인자λ₯Ό λ°›λŠ”λ‹€.

  • upstream : μƒμœ„μ— 흐λ₯΄λŠ” Publisher

  • predicate : μš”μ†Œκ°€ 쑰건과 λ§žλŠ”μ§€ νŒλ‹¨ν•˜κΈ° μœ„ν•œ μ—λŸ¬λ₯Ό λ˜μ§€λŠ” ν΄λ‘œμ €

tryContains μ˜€νΌλ ˆμ΄ν„°μ™€ 관련이 μžˆλ‹€.

Publishers.ContainsWhere의 λ™μž‘κ³Ό κ°™μœΌλ‚˜ λ™μž‘μ„ μˆ˜ν–‰ν•˜λ‹€κ°€ μ—λŸ¬λ₯Ό λ‚Ό 수 μžˆλ‹€λŠ” 차이가 μžˆλ‹€.

RxSwift

ν•΄λ‹Ή κΈ°λŠ₯을 κ΅¬ν˜„ν•˜κΈ° μœ„ν•œ μ˜€νΌλ ˆμ΄ν„°λ₯Ό μ œκ³΅ν•˜μ§€ μ•ŠλŠ”λ‹€.

ReactiveSwift

ν•΄λ‹Ή κΈ°λŠ₯을 κ΅¬ν˜„ν•˜κΈ° μœ„ν•œ μ˜€νΌλ ˆμ΄ν„°λ₯Ό μ œκ³΅ν•˜μ§€ μ•ŠλŠ”λ‹€.

μ°Έκ³ 

ReactiveX - Operators - Contains

Publishers.ContainsWhere

Last updated