pub struct NotifyData<T> {
pub data: Mutex<T>,
pub started: Mutex<bool>,
/* private fields */
}Fields§
§data: Mutex<T>§started: Mutex<bool>Implementations§
Source§impl<T> NotifyData<T>
impl<T> NotifyData<T>
pub fn notify_all(&self)
pub fn wait_or_exit(&self, info: &str) -> (MutexGuard<'_, T>, bool)
pub fn start(&self)
pub fn stop(&self)
pub fn set(&self, data: T)
Source§impl<T> NotifyData<VecDeque<T>>
impl<T> NotifyData<VecDeque<T>>
pub fn wait_or_exit_vec( &self, info: &str, ) -> (MutexGuard<'_, VecDeque<T>>, bool)
pub fn push(&self, data: T)
pub fn keep_last(&self)
Trait Implementations§
Source§impl<T: Debug> Debug for NotifyData<T>
impl<T: Debug> Debug for NotifyData<T>
Source§impl<T: Default> Default for NotifyData<T>
impl<T: Default> Default for NotifyData<T>
Source§fn default() -> NotifyData<T>
fn default() -> NotifyData<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> !Freeze for NotifyData<T>
impl<T> RefUnwindSafe for NotifyData<T>
impl<T> Send for NotifyData<T>where
T: Send,
impl<T> Sync for NotifyData<T>where
T: Send,
impl<T> Unpin for NotifyData<T>where
T: Unpin,
impl<T> UnwindSafe for NotifyData<T>
Blanket Implementations§
Source§impl<T> BoolToOption for T
impl<T> BoolToOption for T
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> DebugString for Twhere
T: Debug,
impl<T> DebugString for Twhere
T: Debug,
fn debug_string(&self) -> String
Source§impl<T> GenUniqueId for T
impl<T> GenUniqueId for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more