pub struct ClosureOnce<T, D> { /* private fields */ }Expand description
A common implementation of ThreadAwareFnOnce.
Construct this using the closure_once function.
Trait Implementations§
Source§impl<T, D> Clone for ClosureOnce<T, D>where
D: Clone,
impl<T, D> Clone for ClosureOnce<T, D>where
D: Clone,
impl<T: Copy, D: Copy> Copy for ClosureOnce<T, D>
Source§impl<T, D> ThreadAware for ClosureOnce<T, D>where
D: ThreadAware,
impl<T, D> ThreadAware for ClosureOnce<T, D>where
D: ThreadAware,
Source§impl<T, D> ThreadAwareFnOnce<T> for ClosureOnce<T, D>where
D: ThreadAware,
impl<T, D> ThreadAwareFnOnce<T> for ClosureOnce<T, D>where
D: ThreadAware,
Auto Trait Implementations§
impl<T, D> Freeze for ClosureOnce<T, D>where
D: Freeze,
impl<T, D> RefUnwindSafe for ClosureOnce<T, D>where
D: RefUnwindSafe,
impl<T, D> Send for ClosureOnce<T, D>where
D: Send,
impl<T, D> Sync for ClosureOnce<T, D>where
D: Sync,
impl<T, D> Unpin for ClosureOnce<T, D>where
D: Unpin,
impl<T, D> UnsafeUnpin for ClosureOnce<T, D>where
D: UnsafeUnpin,
impl<T, D> UnwindSafe for ClosureOnce<T, D>where
D: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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