pub struct Selection { /* private fields */ }Expand description
One user’s selection, shared only across automatic reopens of that publication.
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn with_restore_token(self, token: RestoreToken) -> Self
pub fn with_restore_token(self, token: RestoreToken) -> Self
Seed the selection with a token persisted by an earlier process, so the first open can skip the picker on a compositor that keeps grants.
Sourcepub fn restore_token(&self) -> RestoreTokenConsumer
pub fn restore_token(&self) -> RestoreTokenConsumer
Watch the restore token, to persist each change.
The token is single-use: an open takes it before asking the portal, and
stores the replacement once the portal grants a source. It is None
before a grant, while an open holds it, after an open that failed before
a grant, on a compositor that does not persist grants, and once the
producer ends the stream (the user stopped sharing, the stream failed, or
the source went away). Persist every change and delete the stored copy
on None, since the crate would not use that copy either.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl UnwindSafe for Selection
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.