pub enum SCPickerEvent {
Updated {
result: SCPickerResult,
stream: Option<StreamIdentity>,
},
Cancelled {
stream: Option<StreamIdentity>,
},
Failed(String),
}Expand description
A single event delivered to a repeating observer registered with
SCContentSharingPicker::add_observer.
Unlike SCPickerOutcome, which resolves a one-shot show*() call,
these arrive as many times as the user interacts with the picker.
Variants§
Updated
The user selected (or re-selected) content. Mirrors Apple’s
contentSharingPicker(_:didUpdateWith:for:). stream identifies an
existing stream being updated; None means the user made a new
selection rather than replacing a stream’s source.
Fields
result: SCPickerResultSelected filter and metadata.
stream: Option<StreamIdentity>Non-owning identity of the stream being updated.
Cancelled
The user dismissed the picker. Mirrors
contentSharingPicker(_:didCancelFor:).
Fields
stream: Option<StreamIdentity>Non-owning identity of the stream whose update was cancelled.
Failed(String)
The picker failed to start. Mirrors
contentSharingPickerStartDidFailWithError(_:).