Struct starnix_uapi::ownership::ReleaseGuard
source · pub struct ReleaseGuard<T> { /* private fields */ }
Expand description
A wrapper a round a Releasable object that will check, in test and when assertion are enabled, that the value has been released before being dropped.
Implementations§
source§impl<T> ReleaseGuard<T>
impl<T> ReleaseGuard<T>
sourcepub fn take(this: ReleaseGuard<T>) -> T
pub fn take(this: ReleaseGuard<T>) -> T
Disarm this release guard.
This will prevent any runtime check that the value
has been correctly released.
Trait Implementations§
source§impl<T> AsRef<T> for ReleaseGuard<T>
impl<T> AsRef<T> for ReleaseGuard<T>
source§impl<T> Borrow<T> for ReleaseGuard<T>
impl<T> Borrow<T> for ReleaseGuard<T>
source§impl<T: Clone> Clone for ReleaseGuard<T>
impl<T: Clone> Clone for ReleaseGuard<T>
source§impl<T: Debug> Debug for ReleaseGuard<T>
impl<T: Debug> Debug for ReleaseGuard<T>
source§impl<T: Default> Default for ReleaseGuard<T>
impl<T: Default> Default for ReleaseGuard<T>
source§impl<T> Deref for ReleaseGuard<T>
impl<T> Deref for ReleaseGuard<T>
source§impl<T> DerefMut for ReleaseGuard<T>
impl<T> DerefMut for ReleaseGuard<T>
source§impl<T> From<T> for ReleaseGuard<T>
impl<T> From<T> for ReleaseGuard<T>
source§impl<T: Hash> Hash for ReleaseGuard<T>
impl<T: Hash> Hash for ReleaseGuard<T>
source§impl<T: Ord> Ord for ReleaseGuard<T>
impl<T: Ord> Ord for ReleaseGuard<T>
source§fn cmp(&self, other: &ReleaseGuard<T>) -> Ordering
fn cmp(&self, other: &ReleaseGuard<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq for ReleaseGuard<T>
impl<T: PartialEq> PartialEq for ReleaseGuard<T>
source§fn eq(&self, other: &ReleaseGuard<T>) -> bool
fn eq(&self, other: &ReleaseGuard<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd for ReleaseGuard<T>
impl<T: PartialOrd> PartialOrd for ReleaseGuard<T>
source§fn partial_cmp(&self, other: &ReleaseGuard<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &ReleaseGuard<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T: Releasable> Releasable for ReleaseGuard<T>
impl<T: Releasable> Releasable for ReleaseGuard<T>
source§impl<T: ReleasableByMut> ReleasableByMut for ReleaseGuard<T>
impl<T: ReleasableByMut> ReleasableByMut for ReleaseGuard<T>
source§impl<T: ReleasableByRef> ReleasableByRef for ReleaseGuard<T>
impl<T: ReleasableByRef> ReleasableByRef for ReleaseGuard<T>
impl<T: Eq> Eq for ReleaseGuard<T>
Auto Trait Implementations§
impl<T> !Freeze for ReleaseGuard<T>
impl<T> RefUnwindSafe for ReleaseGuard<T>where
T: RefUnwindSafe,
impl<T> Send for ReleaseGuard<T>where
T: Send,
impl<T> Sync for ReleaseGuard<T>where
T: Sync,
impl<T> Unpin for ReleaseGuard<T>where
T: Unpin,
impl<T> UnwindSafe for ReleaseGuard<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