Struct mischief::StaticToken
source · [−]#[repr(transparent)]pub struct StaticToken<'id>(_);
Expand description
A type of which there can only ever exist one value.
Implementations
sourceimpl<'id> StaticToken<'id>
impl<'id> StaticToken<'id>
sourcepub fn acquire<R, F>(f: F) -> Rwhere
F: for<'new_id> FnOnce(StaticToken<'new_id>) -> R,
pub fn acquire<R, F>(f: F) -> Rwhere
F: for<'new_id> FnOnce(StaticToken<'new_id>) -> R,
Calls the given function with a fresh, unique token that will never be used again.
Trait Implementations
impl<'id> Unique for StaticToken<'id>
Auto Trait Implementations
impl<'id> RefUnwindSafe for StaticToken<'id>
impl<'id> Send for StaticToken<'id>
impl<'id> Sync for StaticToken<'id>
impl<'id> Unpin for StaticToken<'id>
impl<'id> UnwindSafe for StaticToken<'id>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more