Struct compio_runtime::Unattached
source · pub struct Unattached<T: Attachable>(/* private fields */);
Expand description
A Send
wrapper for attachable resource that has not been attached. The
resource should be able to send to another thread before attaching.
Implementations§
source§impl<T: Attachable> Unattached<T>
impl<T: Attachable> Unattached<T>
sourcepub fn new(a: T) -> Result<Self, T>
pub fn new(a: T) -> Result<Self, T>
Create the Unattached
wrapper, or fail if the resource has already
been attached.
sourcepub unsafe fn new_unchecked(a: T) -> Self
pub unsafe fn new_unchecked(a: T) -> Self
Create Unattached
without checking.
Safety
The caller should ensure that the resource has not been attached.
Trait Implementations§
source§impl<T: Attachable> IntoInner for Unattached<T>
impl<T: Attachable> IntoInner for Unattached<T>
impl<T: Attachable> Send for Unattached<T>
impl<T: Attachable> Sync for Unattached<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Unattached<T>where T: RefUnwindSafe,
impl<T> Unpin for Unattached<T>where T: Unpin,
impl<T> UnwindSafe for Unattached<T>where T: 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