Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active April 9, 2020 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/5afdb2544530745ea0749e9093dec063 to your computer and use it in GitHub Desktop.
Save jasdev/5afdb2544530745ea0749e9093dec063 to your computer and use it in GitHub Desktop.
`Event`’s definition
enum Event<Output, Failure: Error> {
case completion(Subscribers.Completion<Failure>) /// (1) Combine already tucks
/// away completion events in their `Subscribers.Completion<Failure>` enumeration.
/// We just wrap it as an associated value in the `Event.completion` case.
case value(Output) /// (2) Any non-completion `Event` represents an emitted value.
/// So, we place it in a `.value` case.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment