pub struct TempClonable<T: AsHandleRef>(/* private fields */);Expand description
A wrapper around zircon handles that allows them to be temporarily cloned. These temporary
clones can be used with unblock below which requires callbacks with static lifetime. This is
similar to Arc
Implementations§
Source§impl<T: AsHandleRef> TempClonable<T>
impl<T: AsHandleRef> TempClonable<T>
Source§impl<T: AsHandleRef> TempClonable<T>
impl<T: AsHandleRef> TempClonable<T>
Sourcepub fn temp_clone(&self) -> TempClone<T>
pub fn temp_clone(&self) -> TempClone<T>
Creates a temporary clone of the handle. The clone should only exist temporarily.
§Panics
Panics if the handle is invalid.
Trait Implementations§
Source§impl<T: AsHandleRef> Deref for TempClonable<T>
impl<T: AsHandleRef> Deref for TempClonable<T>
Source§impl<T: AsHandleRef> Drop for TempClonable<T>
impl<T: AsHandleRef> Drop for TempClonable<T>
Auto Trait Implementations§
impl<T> Freeze for TempClonable<T>where
ManuallyDrop<T>: Freeze,
impl<T> RefUnwindSafe for TempClonable<T>where
ManuallyDrop<T>: RefUnwindSafe,
impl<T> Send for TempClonable<T>where
ManuallyDrop<T>: Send,
impl<T> Sync for TempClonable<T>where
ManuallyDrop<T>: Sync,
impl<T> Unpin for TempClonable<T>where
ManuallyDrop<T>: Unpin,
impl<T> UnsafeUnpin for TempClonable<T>where
ManuallyDrop<T>: UnsafeUnpin,
impl<T> UnwindSafe for TempClonable<T>where
ManuallyDrop<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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