pub struct ParsedFormat<'a, V: FormatArgument> {
pub segments: Vec<Segment<'a, V>>,
}
Expand description
A representation of the formatting string and associated values, ready to be formatted.
Fields§
§segments: Vec<Segment<'a, V>>
A vector of formatting string segments.
Implementations§
Source§impl<'a, V: FormatArgument> ParsedFormat<'a, V>
impl<'a, V: FormatArgument> ParsedFormat<'a, V>
Sourcepub fn parse<P, N>(
format: &'a str,
positional: &'a P,
named: &'a N,
) -> Result<Self, usize>
pub fn parse<P, N>( format: &'a str, positional: &'a P, named: &'a N, ) -> Result<Self, usize>
Parses the formatting string, using given positional and named arguments. Does not perform any formatting. It just parses the formatting string, validates that all the arguments are present, and that each argument supports the requested format.
Trait Implementations§
Source§impl<'a, V: Clone + FormatArgument> Clone for ParsedFormat<'a, V>
impl<'a, V: Clone + FormatArgument> Clone for ParsedFormat<'a, V>
Source§fn clone(&self) -> ParsedFormat<'a, V>
fn clone(&self) -> ParsedFormat<'a, V>
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<'a, V: Debug + FormatArgument> Debug for ParsedFormat<'a, V>
impl<'a, V: Debug + FormatArgument> Debug for ParsedFormat<'a, V>
Source§impl<'a, V: FormatArgument> Display for ParsedFormat<'a, V>
impl<'a, V: FormatArgument> Display for ParsedFormat<'a, V>
Source§impl<'a, V: PartialEq + FormatArgument> PartialEq for ParsedFormat<'a, V>
impl<'a, V: PartialEq + FormatArgument> PartialEq for ParsedFormat<'a, V>
impl<'a, V: FormatArgument> StructuralPartialEq for ParsedFormat<'a, V>
Auto Trait Implementations§
impl<'a, V> Freeze for ParsedFormat<'a, V>
impl<'a, V> RefUnwindSafe for ParsedFormat<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for ParsedFormat<'a, V>where
V: Sync,
impl<'a, V> Sync for ParsedFormat<'a, V>where
V: Sync,
impl<'a, V> Unpin for ParsedFormat<'a, V>
impl<'a, V> UnwindSafe for ParsedFormat<'a, V>where
V: RefUnwindSafe,
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