pub struct Lock { /* private fields */ }Expand description
A SessionLock as the platform holds it: whether the config wants
the session locked, what the compositor says, and each output’s lock
surface. Dropping it disposes its owner, which frees everything it
made.
Implementations§
Source§impl Lock
impl Lock
Sourcepub fn new(cx: &Cx, lock: SessionLock) -> Lock
pub fn new(cx: &Cx, lock: SessionLock) -> Lock
Builds lock under a new child owner of cx. A locked binding is
an effect, so it first runs at the next flush.
§Panics
If cx’s owner was disposed, as Cx::signal does.
Sourcepub fn wanted(&self) -> Option<bool>
pub fn wanted(&self) -> Option<bool>
Whether locked says to lock; None once the lock’s owner is gone.
Sourcepub fn locked(&self) -> ReadSignal<bool>
pub fn locked(&self) -> ReadSignal<bool>
true while the compositor says the session is locked.
Sourcepub fn set_locked(&self, locked: bool)
pub fn set_locked(&self, locked: bool)
Records what the compositor said; a value it holds already is left alone, so nothing reruns.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Lock
impl !Send for Lock
impl !Sync for Lock
impl !UnwindSafe for Lock
impl Forget for Lock
impl Freeze for Lock
impl Move for Lock
impl Unpin for Lock
impl UnsafeUnpin for Lock
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