Optional

public extension Optional
  • Declaration

    Swift

    func unwrapToPublisher(orThrow error: Error) -> AnyPublisher<Wrapped, Error>

    Parameters

    error

    The error to throw if the wrapped value is nil

    Return Value

    A publisher that contains the unwrapped value or the thrown error