SayAs

Enum SayAs 

Source
pub enum SayAs<'s> {
Show 15 variants DateMDY, DateDMY, DateYMD, DateYM, DateMY, DateDM, DateMD, DateYear, Time, NumberCardinal, NumberDigit, NumberFraction, NumberDecimal, PhoneNumber, Custom(&'s str),
}
Expand description

Provides a hint about how to pronounce the associated content.

Variants§

§

DateMDY

Pronounce a sequence of numbers as a date, e.g. “03/08/2000” as “march eighth two thousand”.

§

DateDMY

Pronounce a sequence of numbers as a date, e.g. “03/08/2000” as “august third two thousand”.

§

DateYMD

Pronounce a sequence of numbers as a date, e.g. “2000/08/03” as “march eighth two thousand”.

§

DateYM

Pronounce a sequence of numbers as a year and month, e.g. “2000/03” as “march two thousand”.

§

DateMY

Pronounce a sequence of numbers as a month and year, e.g. “03/2000” as “march two thousand”.

§

DateDM

Pronounce a sequence of numbers as a day and month, e.g. “03/08” as “march eighth”.

§

DateMD

Pronounce a sequence of numbers as a month and day, e.g. “03/08” as “august third”.

§

DateYear

Pronounce a number as a year, e.g. “1979” as “nineteen seventy-nine”.

§

Time

Pronounce a sequence of numbers as a time, e.g. “10:24” as “ten twenty-four”.

§

NumberCardinal

Pronounce a number as a cardinal number, e.g. “1024” as “one thousand twenty-four”.

§

NumberDigit

Pronounce a number as a sequence of digits, e.g. “1024” as “one zero two four”.

§

NumberFraction

Pronounce a number as a fraction, e.g. “3/8” as “three eighths”.

§

NumberDecimal

Pronounce a number as a fraction, e.g. “10.24” as “ten point two four”.

§

PhoneNumber

Pronounce a sequence of numbers as a telephone, e.g. “(206) 555-1234” as “two zero six five five five one two three four”.

§

Custom(&'s str)

A custom pronunciation hint supported by the engine.

Trait Implementations§

Source§

impl<'s> Clone for SayAs<'s>

Source§

fn clone(&self) -> SayAs<'s>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'s> Debug for SayAs<'s>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'s> Hash for SayAs<'s>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'s> PartialEq for SayAs<'s>

Source§

fn eq(&self, other: &SayAs<'s>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'s> Copy for SayAs<'s>

Source§

impl<'s> Eq for SayAs<'s>

Source§

impl<'s> StructuralPartialEq for SayAs<'s>

Auto Trait Implementations§

§

impl<'s> Freeze for SayAs<'s>

§

impl<'s> RefUnwindSafe for SayAs<'s>

§

impl<'s> Send for SayAs<'s>

§

impl<'s> Sync for SayAs<'s>

§

impl<'s> Unpin for SayAs<'s>

§

impl<'s> UnwindSafe for SayAs<'s>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.