ChannelEvent

public enum ChannelEvent<Update, Success>

Value reveived by channel

  • A kind of value that can be received multiple times be for the completion one

    Declaration

    Swift

    case update(Update)
  • A kind of value that can be received once and completes the channel

    Declaration

    Swift

    case completion(Fallible<Success>)
  • Convenence initializer of ChannelEvent.completion

    Declaration

    Swift

    static func success(_ success: Success) -> ChannelEvent

    Parameters

    success

    success value to complete with

    Return Value

    successful completion channel event

  • Convenence initializer of ChannelEvent.completion

    Declaration

    Swift

    static func failure(_ error: Swift.Error) -> ChannelEvent

    Parameters

    failure

    error to complete with

    Return Value

    failure completion channel event

  • Transforms the event to a event of unrelated type Correctness of such transformation is left on our behalf

    Declaration

    Swift

    func staticCast<U, S>() -> ChannelEvent<U, S>