Struct majordome::MajordomeApp
source · pub struct MajordomeApp { /* private fields */ }
Implementations§
source§impl MajordomeApp
impl MajordomeApp
sourcepub fn get_ref(&self) -> &MajordomeAppInner
pub fn get_ref(&self) -> &MajordomeAppInner
Get reference to inner app data.
sourcepub fn into_inner(self) -> Arc<MajordomeAppInner>
pub fn into_inner(self) -> Arc<MajordomeAppInner>
Convert to the internal Arc
source§impl MajordomeApp
impl MajordomeApp
pub async fn new() -> MajordomeApp
source§impl MajordomeApp
impl MajordomeApp
pub fn get<T: AppModPointer + 'static>( &self ) -> Result<&T::Target, MajordomeError>
source§impl MajordomeApp
impl MajordomeApp
sourcepub fn is_exiting(&self) -> bool
pub fn is_exiting(&self) -> bool
exiting -> closing -> terminated
pub fn is_closing(&self) -> bool
sourcepub async fn sleep_until_closing(&self, duration: Duration, ignore_exit: bool)
pub async fn sleep_until_closing(&self, duration: Duration, ignore_exit: bool)
Sleep for a duration. Stops if the app is exiting if !ignore_exit else if the app is closing. Use ignore_exit if you are inside a Module, NEVER use it on the main app.
Trait Implementations§
source§impl Clone for MajordomeApp
impl Clone for MajordomeApp
source§fn clone(&self) -> MajordomeApp
fn clone(&self) -> MajordomeApp
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Deref for MajordomeApp
impl Deref for MajordomeApp
§type Target = Arc<MajordomeAppInner>
type Target = Arc<MajordomeAppInner>
The resulting type after dereferencing.
source§fn deref(&self) -> &Arc<MajordomeAppInner>
fn deref(&self) -> &Arc<MajordomeAppInner>
Dereferences the value.
Auto Trait Implementations§
impl Freeze for MajordomeApp
impl !RefUnwindSafe for MajordomeApp
impl Send for MajordomeApp
impl Sync for MajordomeApp
impl Unpin for MajordomeApp
impl !UnwindSafe for MajordomeApp
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