Skip to content

Emitted elements doesn't match Combine's publisher(for:) #2

@simba909

Description

@simba909

Comparing to the Combine publisher(for:) API:

// where player is an AVPlayer
let cancellable = player.publisher(for: \.rate)
  .sink { rate in
    // "rate" here isn't optional, just like the property on AVPlayer
  }

// this library:
for element in player.sequence(for: \.rate) {
  // element.newValue here is optional :/
  // element also has an oldValue property,
  // which the Combine counterpart doesn't surface
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions