pub struct Formatted<T> { /* private fields */ }
Expand description
A value together with its to_string
representation,
including surrounding it whitespaces and comments.
Implementations§
Source§impl<T> Formatted<T>where
T: ValueRepr,
impl<T> Formatted<T>where
T: ValueRepr,
Sourcepub fn into_value(self) -> T
pub fn into_value(self) -> T
The wrapped value
Sourcepub fn default_repr(&self) -> Repr
pub fn default_repr(&self) -> Repr
Returns the default raw representation.
Sourcepub fn display_repr(&self) -> Cow<'_, str>
pub fn display_repr(&self) -> Cow<'_, str>
Returns a raw representation.
Trait Implementations§
impl<T: Eq> Eq for Formatted<T>
impl<T> StructuralPartialEq for Formatted<T>
Auto Trait Implementations§
impl<T> Freeze for Formatted<T>where
T: Freeze,
impl<T> RefUnwindSafe for Formatted<T>where
T: RefUnwindSafe,
impl<T> Send for Formatted<T>where
T: Send,
impl<T> Sync for Formatted<T>where
T: Sync,
impl<T> Unpin for Formatted<T>where
T: Unpin,
impl<T> UnwindSafe for Formatted<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.