pub struct DebugValue<T>(/* private fields */);
Implementations§
Source§impl<T> DebugValue<T>
impl<T> DebugValue<T>
pub fn new_cloned(x: &T) -> Selfwhere
T: Clone,
pub fn new_with(f: impl FnOnce() -> T) -> Self
pub fn new(x: T) -> Self
pub fn map<R>(self, f: impl FnOnce(T) -> R) -> DebugValue<R>
pub fn zip<U>(self, other: DebugValue<U>) -> DebugValue<(T, U)>
pub fn as_ref(&self) -> DebugValue<&T>
pub fn as_mut(&mut self) -> DebugValue<&mut T>
pub fn assert_eq(&self, other: &T)
pub fn into_option(self) -> Option<T>
pub fn from_option(x: Option<T>) -> Self
pub fn try_from_option(x: Option<T>) -> Option<Self>
Auto Trait Implementations§
impl<T> Freeze for DebugValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for DebugValue<T>where
T: RefUnwindSafe,
impl<T> Send for DebugValue<T>where
T: Send,
impl<T> Sync for DebugValue<T>where
T: Sync,
impl<T> Unpin for DebugValue<T>where
T: Unpin,
impl<T> UnwindSafe for DebugValue<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