pub struct Formatted<T> { /* private fields */ }
Expand description
A wrapper type for a value together with its ToString representation with additional
Decor and span infromation attached.
Creates a new Formatted<T> from a T.
Returns the raw string representation of the value, if any.
Formats the value using its ToString representation.
Consumes the Formatted<T> and returns the wrapped value.
Returns a reference to the wrapped value.
Returns a mutable reference to the wrapped value.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Returns a reference to the object’s
Decor.
Returns a mutable reference to the object’s
Decor.
Decorate the object with decor in-place.
Decorate the object with decor and return the modified value.
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Formats the value using the given formatter.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used
by ==.
This method tests for !=. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Obtains the span information. This only returns
Some if the value was emitted by the
parser.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Converts to this type from the input type.
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.