Enum time::format_description::FormatItem [−][src]
#[non_exhaustive] pub enum FormatItem<'a> { Literal(&'a [u8]), Component(Component), Compound(&'a [Self]), }
This is supported on crate features
formatting
or parsing
only.A complete description of how to format and parse a type.
Variants (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.
Bytes that are formatted as-is.
Note: If you call the format
method that returns a String
, these bytes will be
passed through String::from_utf8_lossy
.
Component(Component)
A minimal representation of a single non-literal item.
Compound(&'a [Self])
A series of literals or components that collectively form a partial or complete description.
Trait Implementations
impl<'a> Clone for FormatItem<'a>
[src]
fn clone(&self) -> FormatItem<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FormatItem<'_>
[src]
impl<'a> Eq for FormatItem<'a>
[src]
impl Formattable for FormatItem<'_>
[src]
This is supported on crate feature
formatting
only.impl Parsable for FormatItem<'_>
[src]
This is supported on crate feature
parsing
only.impl<'a> PartialEq<FormatItem<'a>> for FormatItem<'a>
[src]
fn eq(&self, other: &FormatItem<'a>) -> bool
[src]
fn ne(&self, other: &FormatItem<'a>) -> bool
[src]
impl<'a> StructuralEq for FormatItem<'a>
[src]
impl<'a> StructuralPartialEq for FormatItem<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for FormatItem<'a>
impl<'a> Send for FormatItem<'a>
impl<'a> Sync for FormatItem<'a>
impl<'a> Unpin for FormatItem<'a>
impl<'a> UnwindSafe for FormatItem<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,