pub struct BoxSensitive<T>(/* private fields */);
Expand description
A wrapper suitable for logging and including in errors
This is a newtype around Box<Sensitive<T>>
.
This is useful particularly in errors,
where the box can help reduce the size of error variants
(for example ones containing large values like an OwnedChanTarget
).
BoxSensitive<T>
dereferences to Sensitive<T>
.
Implementations§
Source§impl<T> BoxSensitive<T>
impl<T> BoxSensitive<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Return the innermost T
Trait Implementations§
Source§impl<T: Binary> Binary for BoxSensitive<T>
impl<T: Binary> Binary for BoxSensitive<T>
Source§impl<T: Clone> Clone for BoxSensitive<T>
impl<T: Clone> Clone for BoxSensitive<T>
Source§fn clone(&self) -> BoxSensitive<T>
fn clone(&self) -> BoxSensitive<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for BoxSensitive<T>
impl<T: Debug> Debug for BoxSensitive<T>
Source§impl<T> Deref for BoxSensitive<T>
impl<T> Deref for BoxSensitive<T>
Source§impl<T: Display> Display for BoxSensitive<T>
impl<T: Display> Display for BoxSensitive<T>
Source§impl<T> From<T> for BoxSensitive<T>
impl<T> From<T> for BoxSensitive<T>
Source§fn from(t: T) -> BoxSensitive<T>
fn from(t: T) -> BoxSensitive<T>
Converts to this type from the input type.
Source§impl<T: Hash> Hash for BoxSensitive<T>
impl<T: Hash> Hash for BoxSensitive<T>
Source§impl<T: LowerExp> LowerExp for BoxSensitive<T>
impl<T: LowerExp> LowerExp for BoxSensitive<T>
Source§impl<T: LowerHex> LowerHex for BoxSensitive<T>
impl<T: LowerHex> LowerHex for BoxSensitive<T>
Source§impl<T: Octal> Octal for BoxSensitive<T>
impl<T: Octal> Octal for BoxSensitive<T>
Source§impl<T: Ord> Ord for BoxSensitive<T>
impl<T: Ord> Ord for BoxSensitive<T>
Source§fn cmp(&self, other: &BoxSensitive<T>) -> Ordering
fn cmp(&self, other: &BoxSensitive<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 BoxSensitive<T>
impl<T: PartialEq> PartialEq for BoxSensitive<T>
Source§impl<T: PartialOrd> PartialOrd for BoxSensitive<T>
impl<T: PartialOrd> PartialOrd for BoxSensitive<T>
Source§impl<T: Pointer> Pointer for BoxSensitive<T>
impl<T: Pointer> Pointer for BoxSensitive<T>
Source§impl<T: UpperExp> UpperExp for BoxSensitive<T>
impl<T: UpperExp> UpperExp for BoxSensitive<T>
Source§impl<T: UpperHex> UpperHex for BoxSensitive<T>
impl<T: UpperHex> UpperHex for BoxSensitive<T>
impl<T: Eq> Eq for BoxSensitive<T>
impl<T> StructuralPartialEq for BoxSensitive<T>
Auto Trait Implementations§
impl<T> Freeze for BoxSensitive<T>
impl<T> RefUnwindSafe for BoxSensitive<T>where
T: RefUnwindSafe,
impl<T> Send for BoxSensitive<T>where
T: Send,
impl<T> Sync for BoxSensitive<T>where
T: Sync,
impl<T> Unpin for BoxSensitive<T>
impl<T> UnwindSafe for BoxSensitive<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,
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 moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes