Enum actix_web::cookie::time::format_description::FormatItem
source · [−]#[non_exhaustive]
pub enum FormatItem<'a> {
Literal(&'a [u8]),
Component(Component),
Compound(&'a [BorrowedFormatItem<'a>]),
Optional(&'a BorrowedFormatItem<'a>),
First(&'a [BorrowedFormatItem<'a>]),
}Expand description
A complete description of how to format and parse a type.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Literal(&'a [u8])
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 [BorrowedFormatItem<'a>])
A series of literals or components that collectively form a partial or complete description.
Optional(&'a BorrowedFormatItem<'a>)
A FormatItem that may or may not be present when parsing. If parsing fails, there
will be no effect on the resulting struct.
This variant has no effect on formatting, as the value is guaranteed to be present.
First(&'a [BorrowedFormatItem<'a>])
A series of FormatItems where, when parsing, the first successful parse is used. When
formatting, the first element of the slice is used. An empty slice is a no-op when
formatting or parsing.
Trait Implementations
sourceimpl<'a> Clone for BorrowedFormatItem<'a>
impl<'a> Clone for BorrowedFormatItem<'a>
sourcefn clone(&self) -> BorrowedFormatItem<'a>
fn clone(&self) -> BorrowedFormatItem<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for BorrowedFormatItem<'_>
impl Debug for BorrowedFormatItem<'_>
sourceimpl<'a> From<&'a [BorrowedFormatItem<'_>]> for BorrowedFormatItem<'a>
impl<'a> From<&'a [BorrowedFormatItem<'_>]> for BorrowedFormatItem<'a>
sourcefn from(items: &'a [BorrowedFormatItem<'_>]) -> BorrowedFormatItem<'a>
fn from(items: &'a [BorrowedFormatItem<'_>]) -> BorrowedFormatItem<'a>
sourceimpl From<&BorrowedFormatItem<'_>> for OwnedFormatItem
impl From<&BorrowedFormatItem<'_>> for OwnedFormatItem
sourcefn from(item: &BorrowedFormatItem<'_>) -> OwnedFormatItem
fn from(item: &BorrowedFormatItem<'_>) -> OwnedFormatItem
sourceimpl From<BorrowedFormatItem<'_>> for OwnedFormatItem
impl From<BorrowedFormatItem<'_>> for OwnedFormatItem
sourcefn from(item: BorrowedFormatItem<'_>) -> OwnedFormatItem
fn from(item: BorrowedFormatItem<'_>) -> OwnedFormatItem
sourceimpl From<Component> for BorrowedFormatItem<'_>
impl From<Component> for BorrowedFormatItem<'_>
sourcefn from(component: Component) -> BorrowedFormatItem<'_>
fn from(component: Component) -> BorrowedFormatItem<'_>
sourceimpl<'a> From<Item<'a>> for BorrowedFormatItem<'a>
impl<'a> From<Item<'a>> for BorrowedFormatItem<'a>
sourcefn from(item: Item<'a>) -> BorrowedFormatItem<'a>
fn from(item: Item<'a>) -> BorrowedFormatItem<'a>
sourceimpl PartialEq<&[BorrowedFormatItem<'_>]> for BorrowedFormatItem<'_>
impl PartialEq<&[BorrowedFormatItem<'_>]> for BorrowedFormatItem<'_>
sourcefn eq(&self, rhs: &&[BorrowedFormatItem<'_>]) -> bool
fn eq(&self, rhs: &&[BorrowedFormatItem<'_>]) -> bool
sourceimpl PartialEq<BorrowedFormatItem<'_>> for &[BorrowedFormatItem<'_>]
impl PartialEq<BorrowedFormatItem<'_>> for &[BorrowedFormatItem<'_>]
sourcefn eq(&self, rhs: &BorrowedFormatItem<'_>) -> bool
fn eq(&self, rhs: &BorrowedFormatItem<'_>) -> bool
sourceimpl PartialEq<BorrowedFormatItem<'_>> for Component
impl PartialEq<BorrowedFormatItem<'_>> for Component
sourcefn eq(&self, rhs: &BorrowedFormatItem<'_>) -> bool
fn eq(&self, rhs: &BorrowedFormatItem<'_>) -> bool
sourceimpl<'a> PartialEq<BorrowedFormatItem<'a>> for BorrowedFormatItem<'a>
impl<'a> PartialEq<BorrowedFormatItem<'a>> for BorrowedFormatItem<'a>
sourcefn eq(&self, other: &BorrowedFormatItem<'a>) -> bool
fn eq(&self, other: &BorrowedFormatItem<'a>) -> bool
sourceimpl PartialEq<Component> for BorrowedFormatItem<'_>
impl PartialEq<Component> for BorrowedFormatItem<'_>
sourceimpl TryFrom<BorrowedFormatItem<'_>> for Component
impl TryFrom<BorrowedFormatItem<'_>> for Component
type Error = DifferentVariant
type Error = DifferentVariant
sourcefn try_from(
value: BorrowedFormatItem<'_>
) -> Result<Component, <Component as TryFrom<BorrowedFormatItem<'_>>>::Error>
fn try_from(
value: BorrowedFormatItem<'_>
) -> Result<Component, <Component as TryFrom<BorrowedFormatItem<'_>>>::Error>
sourceimpl<'a> TryFrom<BorrowedFormatItem<'a>> for &[BorrowedFormatItem<'a>]
impl<'a> TryFrom<BorrowedFormatItem<'a>> for &[BorrowedFormatItem<'a>]
type Error = DifferentVariant
type Error = DifferentVariant
sourcefn try_from(
value: BorrowedFormatItem<'a>
) -> Result<&[BorrowedFormatItem<'a>], <&[BorrowedFormatItem<'a>] as TryFrom<BorrowedFormatItem<'a>>>::Error>
fn try_from(
value: BorrowedFormatItem<'a>
) -> Result<&[BorrowedFormatItem<'a>], <&[BorrowedFormatItem<'a>] as TryFrom<BorrowedFormatItem<'a>>>::Error>
impl<'a> Eq for BorrowedFormatItem<'a>
impl Formattable for BorrowedFormatItem<'_>
impl Parsable for BorrowedFormatItem<'_>
impl<'a> StructuralEq for BorrowedFormatItem<'a>
impl<'a> StructuralPartialEq for BorrowedFormatItem<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for BorrowedFormatItem<'a>
impl<'a> Send for BorrowedFormatItem<'a>
impl<'a> Sync for BorrowedFormatItem<'a>
impl<'a> Unpin for BorrowedFormatItem<'a>
impl<'a> UnwindSafe for BorrowedFormatItem<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.