Struct rt_format::parser::ParsedFormat
source · [−]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
sourceimpl<'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> where
P: PositionalArguments<'a, V> + ?Sized,
N: NamedArguments<V>,
pub fn parse<P, N>(
format: &'a str,
positional: &'a P,
named: &'a N
) -> Result<Self, usize> where
P: PositionalArguments<'a, V> + ?Sized,
N: NamedArguments<V>,
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
sourceimpl<'a, V: Clone + FormatArgument> Clone for ParsedFormat<'a, V>
impl<'a, V: Clone + FormatArgument> Clone for ParsedFormat<'a, V>
sourcefn clone(&self) -> ParsedFormat<'a, V>
fn clone(&self) -> ParsedFormat<'a, V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a, V: Debug + FormatArgument> Debug for ParsedFormat<'a, V>
impl<'a, V: Debug + FormatArgument> Debug for ParsedFormat<'a, V>
sourceimpl<'a, V: FormatArgument> Display for ParsedFormat<'a, V>
impl<'a, V: FormatArgument> Display for ParsedFormat<'a, V>
sourceimpl<'a, V: PartialEq + FormatArgument> PartialEq<ParsedFormat<'a, V>> for ParsedFormat<'a, V>
impl<'a, V: PartialEq + FormatArgument> PartialEq<ParsedFormat<'a, V>> for ParsedFormat<'a, V>
sourcefn eq(&self, other: &ParsedFormat<'a, V>) -> bool
fn eq(&self, other: &ParsedFormat<'a, V>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ParsedFormat<'a, V>) -> bool
fn ne(&self, other: &ParsedFormat<'a, V>) -> bool
This method tests for !=
.
impl<'a, V: FormatArgument> StructuralPartialEq for ParsedFormat<'a, V>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more