Struct icu_datetime::options::length::Bag[][src]

pub struct Bag {
    pub date: Option<Date>,
    pub time: Option<Time>,
    pub preferences: Option<Bag>,
}

A structure to represent the set of lengths in which the DateTimeInput implementer should be formatted to.

The available lengths correspond to UTS #35: Unicode LDML 4. Dates, section 2.4 Element dateFormats.

Examples

use icu::datetime::DateTimeFormatOptions;
use icu::datetime::options::length;

let bag = length::Bag {
     date: Some(length::Date::Medium),
     time: Some(length::Time::Short),
     preferences: None,
};

let options = DateTimeFormatOptions::Length(bag);

Or the options can be inferred through the Into trait.

use icu::datetime::DateTimeFormatOptions;
use icu::datetime::options::length;
let options: DateTimeFormatOptions = length::Bag::default().into();

Fields

date: Option<Date>time: Option<Time>preferences: Option<Bag>

Trait Implementations

impl Clone for Bag[src]

impl Debug for Bag[src]

impl Default for Bag[src]

impl<'de> Deserialize<'de> for Bag[src]

impl From<Bag> for DateTimeFormatOptions[src]

impl PartialEq<Bag> for Bag[src]

impl Serialize for Bag[src]

impl StructuralPartialEq for Bag[src]

Auto Trait Implementations

impl RefUnwindSafe for Bag

impl Send for Bag

impl Sync for Bag

impl Unpin for Bag

impl UnwindSafe for Bag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> ErasedDataStruct for T where
    T: Clone + Debug + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.