Struct HostRecorder
pub struct HostRecorder { /* private fields */ }Expand description
What a HostServices::recording host was asked to do, and the answers
it will give.
Copies round-trip through an in-process clipboard; pickers and launches
answer queued outcomes, then Cancelled (launches: Opened); location
requests answer queued fixes, then Unavailable; screen-capture requests
answer queued outcomes, then Cancelled; URIs, utterances
and notifications are recorded; media sessions start and record what the
player publishes.
Implementations§
§impl HostRecorder
impl HostRecorder
pub fn copies(&self) -> Vec<(ClipboardTarget, String)>
pub fn copies(&self) -> Vec<(ClipboardTarget, String)>
Every text copy, in order.
pub fn copy_image_elsewhere(&self, image: ClipboardImage)
pub fn copy_image_elsewhere(&self, image: ClipboardImage)
Another app copies image, as a screenshot tool does: the next paste
reads it, until something copies text.
pub fn opened_uris(&self) -> Vec<String>
pub fn opened_uris(&self) -> Vec<String>
Every URI handed to the opener, in order.
pub fn pick_requests(&self) -> Vec<PickRequest>
pub fn pick_requests(&self) -> Vec<PickRequest>
Every chooser request, in order.
pub fn launch_requests(&self) -> Vec<LaunchRequest>
pub fn launch_requests(&self) -> Vec<LaunchRequest>
Every desktop-open request, in order.
pub fn respond_to_pick(&self, outcome: PortalOutcome)
pub fn respond_to_pick(&self, outcome: PortalOutcome)
Answer the next single-file chooser with outcome.
pub fn respond_to_pick_multiple(&self, outcome: MultiOutcome)
pub fn respond_to_pick_multiple(&self, outcome: MultiOutcome)
Answer the next multi-select chooser with outcome.
pub fn respond_to_open_file(&self, outcome: OpenFileOutcome)
pub fn respond_to_open_file(&self, outcome: OpenFileOutcome)
Answer the next descriptor-retaining chooser with outcome.
pub fn respond_to_launch(&self, outcome: LaunchOutcome)
pub fn respond_to_launch(&self, outcome: LaunchOutcome)
Answer the next desktop-open request with outcome.
pub fn respond_to_location(&self, outcome: LocationOutcome)
pub fn respond_to_location(&self, outcome: LocationOutcome)
Answer the next location request with outcome.
pub fn location_requests(&self) -> usize
pub fn location_requests(&self) -> usize
How many location fixes were requested.
pub fn screen_capture_requests(&self) -> Vec<ScreenCaptureRequest>
pub fn screen_capture_requests(&self) -> Vec<ScreenCaptureRequest>
Every screen-capture request, in order.
pub fn utterances(&self) -> Vec<Utterance>
pub fn utterances(&self) -> Vec<Utterance>
Everything the screen reader was asked to say, in order.
pub fn notifications(&self) -> Vec<Notification>
pub fn notifications(&self) -> Vec<Notification>
Every notification shown, in order.
pub fn media_sessions(&self) -> Vec<MprisConfig>
pub fn media_sessions(&self) -> Vec<MprisConfig>
The configuration of every media session started, in order.
pub fn published_media_state(&self) -> Vec<PlayerSnapshot>
pub fn published_media_state(&self) -> Vec<PlayerSnapshot>
Every player state published to a media session, in order.
Trait Implementations§
§impl Clone for HostRecorder
impl Clone for HostRecorder
§fn clone(&self) -> HostRecorder
fn clone(&self) -> HostRecorder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Default for HostRecorder
impl Default for HostRecorder
§fn default() -> HostRecorder
fn default() -> HostRecorder
§impl FilePicker for HostRecorder
impl FilePicker for HostRecorder
§fn pick(&self, request: PickRequest) -> Receiver<PortalOutcome>
fn pick(&self, request: PickRequest) -> Receiver<PortalOutcome>
§fn pick_multiple(&self, request: PickRequest) -> Receiver<MultiOutcome>
fn pick_multiple(&self, request: PickRequest) -> Receiver<MultiOutcome>
§fn open_file(&self, request: PickRequest) -> Receiver<OpenFileOutcome>
fn open_file(&self, request: PickRequest) -> Receiver<OpenFileOutcome>
§fn launch(&self, request: LaunchRequest) -> Receiver<LaunchOutcome>
fn launch(&self, request: LaunchRequest) -> Receiver<LaunchOutcome>
§fn save_file(&self, request: PickRequest) -> Receiver<OpenFileOutcome>
fn save_file(&self, request: PickRequest) -> Receiver<OpenFileOutcome>
§fn pick_contents(&self, request: PickRequest) -> Receiver<ContentsOutcome>
fn pick_contents(&self, request: PickRequest) -> Receiver<ContentsOutcome>
pick or pick_multiple
answers; a host without local paths (a browser page) implements it
directly. Implementations must enforce the aggregate
PickRequest::contents_byte_limit before reading unbounded contents.§fn save_contents(
&self,
request: PickRequest,
bytes: Vec<u8>,
) -> Receiver<SaveOutcome>
fn save_contents( &self, request: PickRequest, bytes: Vec<u8>, ) -> Receiver<SaveOutcome>
bytes. The default writes to the path
pick answers.§impl LocationProvider for HostRecorder
impl LocationProvider for HostRecorder
§fn locate(&self) -> Receiver<LocationOutcome>
fn locate(&self) -> Receiver<LocationOutcome>
§impl MediaSessionFactory for HostRecorder
impl MediaSessionFactory for HostRecorder
§fn start(
&self,
config: MprisConfig,
_initial: PlayerSnapshot,
) -> Option<MediaSession>
fn start( &self, config: MprisConfig, _initial: PlayerSnapshot, ) -> Option<MediaSession>
config, starting from initial.
None when the host has no media controls; the player then stays
inert.§impl MediaSessionPublisher for HostRecorder
impl MediaSessionPublisher for HostRecorder
§fn publish(&mut self, snapshot: PlayerSnapshot)
fn publish(&mut self, snapshot: PlayerSnapshot)
§impl Notifier for HostRecorder
impl Notifier for HostRecorder
§fn show(&self, notification: &Notification) -> Result<(), NotifyError>
fn show(&self, notification: &Notification) -> Result<(), NotifyError>
notification, replacing any earlier one with the same tag. Read more§fn withdraw(&self, tag: &str) -> Result<(), NotifyError>
fn withdraw(&self, tag: &str) -> Result<(), NotifyError>
tag, if any. Read more§fn schedule(
&self,
notification: &Notification,
at: SystemTime,
) -> Result<(), NotifyError>
fn schedule( &self, notification: &Notification, at: SystemTime, ) -> Result<(), NotifyError>
notification at at, even if this app is no
longer running. Scheduling a tag again replaces the earlier one. Read more§fn schedule_alarm(
&self,
notification: &Notification,
at: SystemTime,
schedule: AlarmSchedule,
) -> Result<(), NotifyError>
fn schedule_alarm( &self, notification: &Notification, at: SystemTime, schedule: AlarmSchedule, ) -> Result<(), NotifyError>
schedule. Read more§fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
§fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>
fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>
§fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError>
fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError>
tag, if any. Read more§impl ScreenCaptureProvider for HostRecorder
impl ScreenCaptureProvider for HostRecorder
§fn request(
&self,
request: ScreenCaptureRequest,
) -> Receiver<ScreenCaptureOutcome>
fn request( &self, request: ScreenCaptureRequest, ) -> Receiver<ScreenCaptureOutcome>
§impl SpeechFactory for HostRecorder
impl SpeechFactory for HostRecorder
Auto Trait Implementations§
impl Freeze for HostRecorder
impl RefUnwindSafe for HostRecorder
impl Send for HostRecorder
impl Sync for HostRecorder
impl Unpin for HostRecorder
impl UnsafeUnpin for HostRecorder
impl UnwindSafe for HostRecorder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more