#[non_exhaustive]pub enum ParseSegment<'a> {
Literal(&'a str),
Key(&'a str),
}
Expand description
An enum representing the parsed portion of a format string
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Literal(&'a str)
A string literal to be included as is
Key(&'a str)
A keyed value, that should be looked up using FormatKey
Trait Implementations§
Source§impl<'a> Clone for ParseSegment<'a>
impl<'a> Clone for ParseSegment<'a>
Source§fn clone(&self) -> ParseSegment<'a>
fn clone(&self) -> ParseSegment<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ParseSegment<'a>
impl<'a> Debug for ParseSegment<'a>
Source§impl Default for ParseSegment<'_>
impl Default for ParseSegment<'_>
Source§impl<'a> FromIterator<ParseSegment<'a>> for ParsedFmt<'a>
impl<'a> FromIterator<ParseSegment<'a>> for ParsedFmt<'a>
Source§fn from_iter<T: IntoIterator<Item = ParseSegment<'a>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = ParseSegment<'a>>>(iter: T) -> Self
Creates a value from an iterator. Read more
impl<'a> Copy for ParseSegment<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParseSegment<'a>
impl<'a> RefUnwindSafe for ParseSegment<'a>
impl<'a> Send for ParseSegment<'a>
impl<'a> Sync for ParseSegment<'a>
impl<'a> Unpin for ParseSegment<'a>
impl<'a> UnwindSafe for ParseSegment<'a>
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