Type Definition tokenlock::UnsyncSingletonTokenRefMut[][src]

type UnsyncSingletonTokenRefMut<'a, Tag> = SingletonTokenRefMut<'a, Tag, UnsyncVariant>;

Zero-sized logical equivalent of &'a mut UnsyncSingletonToken<Tag>. The !Sync variant of SingletonTokenRefMut.

Examples

UnsyncSingletonTokenRefMut is Send-able because UnsyncSingletonToken is Send:

let token: &'static mut UnsyncSingletonTokenGuard<MyTag> =
    Box::leak(Box::new(UnsyncSingletonToken::<MyTag>::new().unwrap()));
let token_ref: UnsyncSingletonTokenRefMut<MyTag> = token.borrow_mut();
std::thread::spawn(move || {
    let _token_ref = token_ref;
});