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§impl<T: PartialOrd> PartialOrd for ReleaseGuard<T>
impl<T: PartialOrd> PartialOrd for ReleaseGuard<T>
Source§impl<T: Releasable> Releasable for ReleaseGuard<T>
impl<T: Releasable> Releasable 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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