pub struct LockRuntime { /* private fields */ }Implementations§
Source§impl LockRuntime
impl LockRuntime
pub fn from_env() -> Result<Self>
pub fn from_config(config: Config) -> Result<Self>
Sourcepub fn for_frontend_from_env() -> Result<Self>
pub fn for_frontend_from_env() -> Result<Self>
Authentication-only runtime for a frontend/toolkit-owned session lock. Does not create a Wayland display backend or attest to display state.
pub fn for_frontend(config: Config) -> Result<Self>
pub fn with_parts( config: Config, auth: Arc<dyn LockAuthBackend>, display: Arc<dyn DisplayBackend>, events: EventBus, ) -> Self
pub fn config(&self) -> &Config
pub fn events(&self) -> EventBus
pub fn lock_now(&self) -> Result<()>
pub fn unlock(&self, request: &AuthRequest) -> AuthOutcome
Sourcepub fn authenticate_unlock(&self, request: &AuthRequest) -> AuthOutcome
pub fn authenticate_unlock(&self, request: &AuthRequest) -> AuthOutcome
Authenticates only in for_frontend mode. No display state is changed or
published; the toolkit must release its own session-lock after success.
Sourcepub fn state(&self) -> Result<LockState>
pub fn state(&self) -> Result<LockState>
Backend state, refreshed from worker health. Frontend mode is Unknown.
pub fn launch_lock_frontend(&self) -> Result<i32>
Auto Trait Implementations§
impl !Freeze for LockRuntime
impl !RefUnwindSafe for LockRuntime
impl !UnwindSafe for LockRuntime
impl Send for LockRuntime
impl Sync for LockRuntime
impl Unpin for LockRuntime
impl UnsafeUnpin for LockRuntime
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.