SimplisticExampleOfConversion

Struct SimplisticExampleOfConversion 

Source
pub struct SimplisticExampleOfConversion<U: Unit> {
    pub em: U::Number,
    pub ex: U::Number,
    pub ch: U::Number,
    pub rem: U::Number,
    pub vw: U::Number,
    pub vh: U::Number,
    pub vmin: U::Number,
    pub vmax: U::Number,
    pub one_hundred_percent_in_absolute_units: U::Number,
    pub cssVariablesWithLowerCaseNamesWithoutLeadingDoubleDashToRawCss: HashMap<String, String>,
    pub attributesWithLowerCaseNames: HashMap<String, String>,
}

Fields§

§em: U::Number§ex: U::Number§ch: U::Number§rem: U::Number§vw: U::Number§vh: U::Number§vmin: U::Number§vmax: U::Number§one_hundred_percent_in_absolute_units: U::Number§cssVariablesWithLowerCaseNamesWithoutLeadingDoubleDashToRawCss: HashMap<String, String>§attributesWithLowerCaseNames: HashMap<String, String>

Trait Implementations§

Source§

impl<U: Unit> AttributeConversion<U> for SimplisticExampleOfConversion<U>

Source§

fn attributeValue(&self, attribute_lower_case_name: &str) -> (Option<&str>, U)

Returns the (value of the attribute, property default) In this simplistic example, since we don’t know th property name, we assume all property defaults are the specification default: https://drafts.csswg.org/css-values-3/#typedef-type-or-unit

Source§

impl<U: Clone + Unit> Clone for SimplisticExampleOfConversion<U>
where U::Number: Clone,

Source§

fn clone(&self) -> SimplisticExampleOfConversion<U>

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<U: Unit> CssVariableConversion for SimplisticExampleOfConversion<U>

Source§

fn cssVariableValue( &self, css_variable_lower_case_name_without_leading_double_dash: &str, ) -> Option<&str>

Source§

impl<U: Debug + Unit> Debug for SimplisticExampleOfConversion<U>
where U::Number: Debug,

Source§

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

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

impl<U: Default + Unit> Default for SimplisticExampleOfConversion<U>
where U::Number: Default,

Source§

fn default() -> SimplisticExampleOfConversion<U>

Returns the “default value” for a type. Read more
Source§

impl<U: Unit> FontRelativeLengthConversion<<U as Unit>::Number> for SimplisticExampleOfConversion<U>

Source§

fn em(&self) -> U::Number

Source§

fn ex(&self) -> U::Number

Source§

fn ch(&self) -> U::Number

Source§

fn rem(&self) -> U::Number

Source§

impl<U: Unit> PercentageConversion<<U as Unit>::Number> for SimplisticExampleOfConversion<U>

Source§

impl<U: Unit> ViewportPercentageLengthConversion<<U as Unit>::Number> for SimplisticExampleOfConversion<U>

Source§

fn vw(&self) -> U::Number

Source§

fn vh(&self) -> U::Number

Source§

fn vmin(&self) -> U::Number

Source§

fn vmax(&self) -> U::Number

Auto Trait Implementations§

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.