Struct time::server::ThreadSafeState
source · pub struct ThreadSafeState(/* private fields */);Available on crate feature
server only.Expand description
Thread safe version of the ServerState.
It allows the Server to mutate its state even from a
std::thread::spawn).
Implementations§
source§impl ThreadSafeState
impl ThreadSafeState
sourcepub fn set_running(&self) -> Result<()>
pub fn set_running(&self) -> Result<()>
Change the inner server state to running.
sourcepub fn set_stopping(&self) -> Result<()>
pub fn set_stopping(&self) -> Result<()>
Change the inner server state to stopping.
sourcepub fn set_stopped(&self) -> Result<()>
pub fn set_stopped(&self) -> Result<()>
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 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 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 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