PassthroughSubject

Horus-iOS·2023년 1월 5일
0

Combine

목록 보기
8/9

https://developer.apple.com/documentation/combine/passthroughsubject

A subject that broadcasts elements to downstream subscribers.

다운스트림 Subscriber들에게 요소들을 내보내는 Subject입니다.

Declaration

final class PassthroughSubject<Output, Failure> where Failure : Error

Overview

Subject의 구체화한 구현으로써 PassthroughSubject는 컴바인 모델에 존재하는 선언적 코드를 적용하는 데 편의를 제공합니다.

CurrentValueSubject와 달리 PassthroughSubject는 초기값 혹은 가장 최근에 퍼블리시된 요소의 버퍼를 갖지 않습니다. PassthroughSubject는 Subscriber가 존재하지 않는 경우 값을 누락시키거나 현재 요청은 0입니다.

0개의 댓글