pub struct ThreadSafeState(/* private fields */);
Available on crate feature
server
only.Expand description
Thread safe version of the server state.
Implementations§
Source§impl ThreadSafeState
impl ThreadSafeState
Sourcepub async fn set_running(&self)
pub async fn set_running(&self)
Change the inner server state to running.
Sourcepub async fn set_stopping(&self)
pub async fn set_stopping(&self)
Change the inner server state to stopping.
Sourcepub async fn set_stopped(&self)
pub async fn set_stopped(&self)
Change the inner server state to stopped.
Trait Implementations§
Source§impl Clone for ThreadSafeState
impl Clone for ThreadSafeState
Source§fn clone(&self) -> ThreadSafeState
fn clone(&self) -> ThreadSafeState
Returns a duplicate 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 Debug for ThreadSafeState
impl Debug for ThreadSafeState
Source§impl Default for ThreadSafeState
impl Default for ThreadSafeState
Source§fn default() -> ThreadSafeState
fn default() -> ThreadSafeState
Returns the “default value” for a type. Read more
Source§impl Deref for ThreadSafeState
impl Deref for ThreadSafeState
Auto Trait Implementations§
impl Freeze for ThreadSafeState
impl !RefUnwindSafe for ThreadSafeState
impl Send for ThreadSafeState
impl Sync for ThreadSafeState
impl Unpin for ThreadSafeState
impl !UnwindSafe for ThreadSafeState
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