pub struct TempClonable<T: HandleBased>(/* 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: HandleBased> TempClonable<T>
impl<T: HandleBased> TempClonable<T>
Source§impl<T: HandleBased> TempClonable<T>
impl<T: HandleBased> 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: HandleBased> Deref for TempClonable<T>
impl<T: HandleBased> Deref for TempClonable<T>
Source§impl<T: HandleBased> Drop for TempClonable<T>
impl<T: HandleBased> Drop for TempClonable<T>
Auto Trait Implementations§
impl<T> Freeze for TempClonable<T>where
T: Freeze,
impl<T> RefUnwindSafe for TempClonable<T>where
T: RefUnwindSafe,
impl<T> Send for TempClonable<T>where
T: Send,
impl<T> Sync for TempClonable<T>where
T: Sync,
impl<T> Unpin for TempClonable<T>where
T: Unpin,
impl<T> UnwindSafe for TempClonable<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
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