pub struct Unique<T: 'static + Send> { /* private fields */ }
Expand description
Wrapper for resources that only support one consumer.
Normally, all the resources should support sharing between several tasks, but there are some cases where a resource should only be consumed by a single task.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Unique<T>
impl<T> RefUnwindSafe for Unique<T>
impl<T> Send for Unique<T>
impl<T> Sync for Unique<T>
impl<T> Unpin for Unique<T>
impl<T> UnwindSafe for Unique<T>
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