FirebaseFunctions Framework Reference

StreamResponse

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public enum StreamResponse<Message: Decodable, Result: Decodable>: Decodable,
  StreamResponseProtocol

A convenience type used to receive both the streaming callable function’s yielded messages and its return value.

This can be used as the generic Response parameter to Callable to receive both the yielded messages and final return value of the streaming callable function.

  • The message yielded by the callable function.

    Declaration

    Swift

    case message(Message)
  • The final result returned by the callable function.

    Declaration

    Swift

    case result(Result)
  • Declaration

    Swift

    public init(from decoder: any Decoder) throws