Skip to main content

ProcessRecorder

Struct ProcessRecorder 

Source
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

Source

pub fn copies(&self) -> Vec<(ClipboardTarget, String)>

Every text copy, in order.

Source

pub fn rich_copies(&self) -> Vec<String>

The HTML of every formatted copy, in order. Their words are among Self::copies.

Source

pub fn secret_copies(&self) -> Vec<String>

Every secret copy, in order. These are not among Self::copies.

Source

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.

Source

pub fn opened_uris(&self) -> Vec<String>

Every URI handed to the opener, in order.

Source

pub fn pick_requests(&self) -> Vec<PickRequest>

Every chooser request, in order.

Source

pub fn launch_requests(&self) -> Vec<LaunchRequest>

Every desktop-open request, in order.

Source

pub fn respond_to_pick(&self, outcome: PortalOutcome)

Answer the next single-file chooser with outcome.

Source

pub fn respond_to_pick_multiple(&self, outcome: MultiOutcome)

Answer the next multi-select chooser with outcome.

Source

pub fn respond_to_open_file(&self, outcome: OpenFileOutcome)

Answer the next descriptor-retaining chooser with outcome.

Source

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.

Source

pub fn respond_to_launch(&self, outcome: LaunchOutcome)

Answer the next desktop-open request with outcome.

Source

pub fn respond_to_location(&self, outcome: LocationOutcome)

Answer the next location request with outcome.

Source

pub fn location_requests(&self) -> usize

How many location fixes were requested.

Source

pub fn screen_capture_requests(&self) -> Vec<ScreenCaptureRequest>

Every screen-capture request, in order.

Source

pub fn utterances(&self) -> Vec<Utterance>

Everything the screen reader was asked to say, in order.

Source

pub fn notifications(&self) -> Vec<Notification>

Every notification shown, in order.

Source

pub fn media_sessions(&self) -> Vec<MprisConfig>

The configuration of every media session started, in order.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ProcessRecorder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl FilePicker for ProcessRecorder

Source§

fn pick(&self, request: PickRequest) -> PortalChannel

Ask the person for a file and answer it by reference: what names it again, and what is handed on when it is opened.
Source§

fn pick_multiple(&self, request: PickRequest) -> MultiChannel

Source§

fn open_handle(&self, request: PickRequest) -> OpenFileChannel

Ask the person for a file or folder and answer it already open, with what names it again (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

Open a file or folder again by the reference a choice answered (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.
Source§

fn launch(&self, request: LaunchRequest) -> LaunchChannel

Source§

fn save_file(&self, request: PickRequest) -> Receiver<OpenFileOutcome>

Source§

fn save_destination(&self, request: PickRequest) -> DestinationChannel

Source§

fn save_contents( &self, request: PickRequest, bytes: Vec<u8>, ) -> Receiver<SaveOutcome>

Source§

impl LocationProvider for ProcessRecorder

Source§

impl MediaSessionFactory for ProcessRecorder

Source§

fn start( &self, config: MprisConfig, _initial: PlayerSnapshot, ) -> Option<MediaSession>

Register a player described by config, starting from initial. None when the process has no media controls; the player then stays inert.
Source§

impl MediaSessionPublisher for ProcessRecorder

Source§

fn publish(&mut self, snapshot: PlayerSnapshot)

Publish the latest player state. Must not block.
Source§

impl Notifier for ProcessRecorder

Source§

fn show(&self, notification: &Notification) -> Result<(), NotifyError>

Source§

fn withdraw(&self, tag: &str) -> Result<(), NotifyError>

Source§

fn schedule( &self, notification: &Notification, at: SystemTime, ) -> Result<(), NotifyError>

Source§

fn schedule_alarm( &self, notification: &Notification, at: SystemTime, schedule: AlarmSchedule, ) -> Result<(), NotifyError>

Source§

fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>

Calendar handoffs and delivered occurrences owned by this app; a host that keeps only an absolute deadline returns none.
Source§

fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>

Source§

fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError>

Source§

impl ScreenCaptureProvider for ProcessRecorder

Source§

fn request(&self, request: ScreenCaptureRequest) -> ScreenCaptureChannel

Ask the user for a screen or window to capture. Answers over the channel, never blocking the caller while the process shows its picker.
Source§

impl SpeechFactory for ProcessRecorder

Source§

fn make(&self) -> Box<dyn Speaker>

A fresh speaker. Must not fail: a process without speech returns a tts::NullSpeaker.
Source§

impl UriOpener for ProcessRecorder

Source§

fn open(&self, uri: &str) -> Result<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more