Skip to main content

Values

Struct Values 

Source
pub struct Values<T: 'static> { /* private fields */ }
Expand description

The names of a simple type, as one place reads them: the cases that it tells apart, and for a type with many names, such as ST_NumberFormat, all the type’s names, of which those that are no case are drawn as one case.

Implementations§

Source§

impl<T> Values<T>

Source

pub const fn new(cases: &'static [Case<T>]) -> Self

A table whose cases are all the type’s names.

Source

pub const fn with_others( cases: &'static [Case<T>], names: &'static [&'static str], other: T, ) -> Self

A table of the cases cases and of the type’s names names, which hold the names of the cases too: each name that is no case is drawn as other.

Source

pub fn find(&self, value: &str) -> Option<(&T, &'static str, Drawn)>

The case of the name value, its spelling and how F-Office draws it, or None when it is no name of the type: the exact spelling, as XML Schema compares the values of an enumeration.

Source

pub fn find_any_case(&self, value: &str) -> Option<(&T, &'static str, Drawn)>

The case of the name value in any ASCII case, as Values::find reads the exact spelling, with the name as the table spells it: for a keyword of CSS, such as a property of the style of a VML shape, which CSS2 (4.1.3) reads in any case.

Source

pub fn names(&self) -> Vec<(&'static str, Drawn)>

Each name of the type with how F-Office draws it, such as for the test beside each table that checks it against the schema’s names.

Trait Implementations§

Source§

impl<T: Debug + 'static> Debug for Values<T>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Forget for Values<T>

§

impl<T> Freeze for Values<T>
where &'static [Case<T>]: Freeze, &'static [&'static str]: Freeze, T: Freeze,

§

impl<T> Move for Values<T>

§

impl<T> RefUnwindSafe for Values<T>
where T: RefUnwindSafe,

§

impl<T> Send for Values<T>
where T: Send, &'static [Case<T>]: Send, &'static [&'static str]: Send,

§

impl<T> Sync for Values<T>
where T: Sync,

§

impl<T> Unpin for Values<T>
where T: Unpin, &'static [Case<T>]: Unpin, &'static [&'static str]: Unpin,

§

impl<T> UnsafeUnpin for Values<T>
where &'static [Case<T>]: UnsafeUnpin, &'static [&'static str]: UnsafeUnpin, T: UnsafeUnpin,

§

impl<T> UnwindSafe for Values<T>
where &'static [Case<T>]: UnwindSafe, &'static [&'static str]: UnwindSafe, T: UnwindSafe,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.