pub struct ProcessRecorder { /* private fields */ }Expand description
What a ProcessServices::recording process 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§
Source§impl ProcessRecorder
impl ProcessRecorder
Sourcepub fn copies(&self) -> Vec<(ClipboardTarget, String)>
pub fn copies(&self) -> Vec<(ClipboardTarget, String)>
Every text copy, in order.
Sourcepub fn rich_copies(&self) -> Vec<String>
pub fn rich_copies(&self) -> Vec<String>
The HTML of every formatted copy, in order. Their words are among
Self::copies.
Sourcepub fn secret_copies(&self) -> Vec<String>
pub fn secret_copies(&self) -> Vec<String>
Every secret copy, in order. These are not among Self::copies.
Sourcepub 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.
Sourcepub fn opened_uris(&self) -> Vec<String>
pub fn opened_uris(&self) -> Vec<String>
Every URI handed to the opener, in order.
Sourcepub fn pick_requests(&self) -> Vec<PickRequest>
pub fn pick_requests(&self) -> Vec<PickRequest>
Every chooser request, in order.
Sourcepub fn launch_requests(&self) -> Vec<LaunchRequest>
pub fn launch_requests(&self) -> Vec<LaunchRequest>
Every desktop-open request, in order.
Sourcepub fn respond_to_pick(&self, outcome: PortalOutcome)
pub fn respond_to_pick(&self, outcome: PortalOutcome)
Answer the next single-file chooser with outcome.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn respond_to_reopen(&self, outcome: OpenFileOutcome)
pub fn respond_to_reopen(&self, outcome: OpenFileOutcome)
Answer the next reopen of a reference with outcome: what a window restored on the file
it showed waits for.
Sourcepub fn respond_to_launch(&self, outcome: LaunchOutcome)
pub fn respond_to_launch(&self, outcome: LaunchOutcome)
Answer the next desktop-open request with outcome.
Sourcepub fn respond_to_location(&self, outcome: LocationOutcome)
pub fn respond_to_location(&self, outcome: LocationOutcome)
Answer the next location request with outcome.
Sourcepub fn location_requests(&self) -> usize
pub fn location_requests(&self) -> usize
How many location fixes were requested.
Sourcepub fn screen_capture_requests(&self) -> Vec<ScreenCaptureRequest>
pub fn screen_capture_requests(&self) -> Vec<ScreenCaptureRequest>
Every screen-capture request, in order.
Sourcepub fn utterances(&self) -> Vec<Utterance>
pub fn utterances(&self) -> Vec<Utterance>
Everything the screen reader was asked to say, in order.
Sourcepub fn notifications(&self) -> Vec<Notification>
pub fn notifications(&self) -> Vec<Notification>
Every notification shown, in order.
Sourcepub fn media_sessions(&self) -> Vec<MprisConfig>
pub fn media_sessions(&self) -> Vec<MprisConfig>
The configuration of every media session started, in order.
Sourcepub 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§
Source§impl Clone for ProcessRecorder
impl Clone for ProcessRecorder
Source§impl Default for ProcessRecorder
impl Default for ProcessRecorder
Source§impl FilePicker for ProcessRecorder
impl FilePicker for ProcessRecorder
Source§fn pick(&self, request: PickRequest) -> PortalChannel
fn pick(&self, request: PickRequest) -> PortalChannel
fn pick_multiple(&self, request: PickRequest) -> MultiChannel
Source§fn open_handle(&self, request: PickRequest) -> OpenFileChannel
fn open_handle(&self, request: PickRequest) -> OpenFileChannel
portal::ChosenHandle): for a file an app reads in place, or a folder it walks. This
is the one answer a chooser gives an app: a native host hands a descriptor it opened with
the person’s rights, and a page hands the bytes it read. A chooser that only picks paths
answers none.Source§fn reopen(&self, _reference: &Path, _write: bool) -> OpenFileChannel
fn reopen(&self, _reference: &Path, _write: bool) -> OpenFileChannel
portal::ChosenHandle::reference): a window restored on what it showed, or a file
inside a folder the person chose. Only a reference this app was given is reached; a host
that cannot name a choice again answers none.fn launch(&self, request: LaunchRequest) -> LaunchChannel
fn save_file(&self, request: PickRequest) -> Receiver<OpenFileOutcome>
fn save_destination(&self, request: PickRequest) -> DestinationChannel
fn save_contents( &self, request: PickRequest, bytes: Vec<u8>, ) -> Receiver<SaveOutcome>
Source§impl LocationProvider for ProcessRecorder
impl LocationProvider for ProcessRecorder
fn locate(&self) -> LocationChannel
Source§impl MediaSessionFactory for ProcessRecorder
impl MediaSessionFactory for ProcessRecorder
Source§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 process has no media controls; the player then stays
inert.Source§impl MediaSessionPublisher for ProcessRecorder
impl MediaSessionPublisher for ProcessRecorder
Source§fn publish(&mut self, snapshot: PlayerSnapshot)
fn publish(&mut self, snapshot: PlayerSnapshot)
Source§impl Notifier for ProcessRecorder
impl Notifier for ProcessRecorder
fn show(&self, notification: &Notification) -> Result<(), NotifyError>
fn withdraw(&self, tag: &str) -> Result<(), NotifyError>
fn schedule( &self, notification: &Notification, at: SystemTime, ) -> Result<(), NotifyError>
fn schedule_alarm( &self, notification: &Notification, at: SystemTime, schedule: AlarmSchedule, ) -> Result<(), NotifyError>
Source§fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>
fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError>
Source§impl ScreenCaptureProvider for ProcessRecorder
impl ScreenCaptureProvider for ProcessRecorder
Source§fn request(&self, request: ScreenCaptureRequest) -> ScreenCaptureChannel
fn request(&self, request: ScreenCaptureRequest) -> ScreenCaptureChannel
Source§impl SpeechFactory for ProcessRecorder
impl SpeechFactory for ProcessRecorder
Auto Trait Implementations§
impl Forget for ProcessRecorder
impl Freeze for ProcessRecorder
impl Move for ProcessRecorder
impl RefUnwindSafe for ProcessRecorder
impl Send for ProcessRecorder
impl Sync for ProcessRecorder
impl Unpin for ProcessRecorder
impl UnsafeUnpin for ProcessRecorder
impl UnwindSafe for ProcessRecorder
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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