Dimension

Enum Dimension 

Source
pub enum Dimension {
    Frequency(Frequency),
    Length(Length),
    Resolution(Resolution),
    Time(Time),
}
Expand description

Variants§

§

Frequency(Frequency)

§

Length(Length)

§

Resolution(Resolution)

§

Time(Time)

Implementations§

Source§

impl Dimension

Source

pub const fn is_frequency(&self) -> bool

Returns true if the enum is Dimension::Frequency otherwise false

Source

pub const fn is_length(&self) -> bool

Returns true if the enum is Dimension::Length otherwise false

Source

pub const fn is_resolution(&self) -> bool

Returns true if the enum is Dimension::Resolution otherwise false

Source

pub const fn is_time(&self) -> bool

Returns true if the enum is Dimension::Time otherwise false

Trait Implementations§

Source§

impl AbsoluteLengthStorage for Dimension

Source§

fn absolute_length(value: AbsoluteLength) -> Self
where Self: Sized,

Source§

impl CapHeightStorage for Dimension

Source§

fn cap(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cap" (Cap) as value to store. Read more
Source§

impl CentimeterStorage for Dimension

Source§

fn cm(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cm" (Cm) as value to store. Read more
Source§

impl CharSizeStorage for Dimension

Source§

fn ch(value: isize) -> Self
where Self: Sized,

Use a CSS unit "ch" (Ch) as value to store. Read more
Source§

impl Clone for Dimension

Source§

fn clone(&self) -> Dimension

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 ContainerLengthStorage for Dimension

Source§

fn container_length(value: ContainerLength) -> Self
where Self: Sized,

Source§

impl ContainerQueryBlockStorage for Dimension

Source§

fn cqb(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cqb" (Cqb) as value to store. Read more
Source§

impl ContainerQueryHeightStorage for Dimension

Source§

fn cqh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cqh" (Cqh) as value to store. Read more
Source§

impl ContainerQueryInlineStorage for Dimension

Source§

fn cqi(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cqi" (Cqi) as value to store. Read more
Source§

impl ContainerQueryMaxStorage for Dimension

Source§

fn cqmax(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cqmax" (Cqmax) as value to store. Read more
Source§

impl ContainerQueryMinStorage for Dimension

Source§

fn cqmin(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cqmin" (Cqmin) as value to store. Read more
Source§

impl ContainerQueryWidthStorage for Dimension

Source§

fn cqw(value: f64) -> Self
where Self: Sized,

Use a CSS unit "cqw" (Cqw) as value to store. Read more
Source§

impl Debug for Dimension

Source§

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

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

impl Display for Dimension

Source§

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

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

impl DotsPerCentimeterStorage for Dimension

Source§

fn dpcm(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dpcm" (Dpcm) as value to store. Read more
Source§

impl DotsPerInchStorage for Dimension

Source§

fn dpi(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dpi" (Dpi) as value to store. Read more
Source§

impl DotsPerPixelStorage for Dimension

Source§

fn dppx(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dppx" (Dppx) as value to store. Read more
Source§

impl DynamicViewportBlockStorage for Dimension

Source§

fn dvb(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dvb" (Dvb) as value to store. Read more
Source§

impl DynamicViewportHeightStorage for Dimension

Source§

fn dvh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dvh" (Dvh) as value to store. Read more
Source§

impl DynamicViewportInlineStorage for Dimension

Source§

fn dvi(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dvi" (Dvi) as value to store. Read more
Source§

impl DynamicViewportMaxStorage for Dimension

Source§

fn dvmax(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dvmax" (Dvmax) as value to store. Read more
Source§

impl DynamicViewportMinStorage for Dimension

Source§

fn dvmin(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dvmin" (Dvmin) as value to store. Read more
Source§

impl DynamicViewportWidthStorage for Dimension

Source§

fn dvw(value: f64) -> Self
where Self: Sized,

Use a CSS unit "dvw" (Dvw) as value to store. Read more
Source§

impl EmStorage for Dimension

Source§

fn em(value: f64) -> Self
where Self: Sized,

Use a CSS unit "em" (Em) as value to store. Read more
Source§

impl ExStorage for Dimension

Source§

fn ex(value: f64) -> Self
where Self: Sized,

Use a CSS unit "ex" (Ex) as value to store. Read more
Source§

impl FontLengthStorage for Dimension

Source§

fn font_length(value: FontLength) -> Self
where Self: Sized,

Source§

impl FrequencyStorage for Dimension

Source§

fn frequency(value: Frequency) -> Self
where Self: Sized,

Source§

impl From<AbsoluteLength> for Dimension

Source§

fn from(value: AbsoluteLength) -> Self

Converts to this type from the input type.
Source§

impl From<Cap> for Dimension

Source§

fn from(value: Cap) -> Self

Converts to this type from the input type.
Source§

impl From<Ch> for Dimension

Source§

fn from(value: Ch) -> Self

Converts to this type from the input type.
Source§

impl From<Cm> for Dimension

Source§

fn from(value: Cm) -> Self

Converts to this type from the input type.
Source§

impl From<ContainerLength> for Dimension

Source§

fn from(value: ContainerLength) -> Self

Converts to this type from the input type.
Source§

impl From<Cqb> for Dimension

Source§

fn from(value: Cqb) -> Self

Converts to this type from the input type.
Source§

impl From<Cqh> for Dimension

Source§

fn from(value: Cqh) -> Self

Converts to this type from the input type.
Source§

impl From<Cqi> for Dimension

Source§

fn from(value: Cqi) -> Self

Converts to this type from the input type.
Source§

impl From<Cqmax> for Dimension

Source§

fn from(value: Cqmax) -> Self

Converts to this type from the input type.
Source§

impl From<Cqmin> for Dimension

Source§

fn from(value: Cqmin) -> Self

Converts to this type from the input type.
Source§

impl From<Cqw> for Dimension

Source§

fn from(value: Cqw) -> Self

Converts to this type from the input type.
Source§

impl From<Dpcm> for Dimension

Source§

fn from(value: Dpcm) -> Self

Converts to this type from the input type.
Source§

impl From<Dpi> for Dimension

Source§

fn from(value: Dpi) -> Self

Converts to this type from the input type.
Source§

impl From<Dppx> for Dimension

Source§

fn from(value: Dppx) -> Self

Converts to this type from the input type.
Source§

impl From<Dvb> for Dimension

Source§

fn from(value: Dvb) -> Self

Converts to this type from the input type.
Source§

impl From<Dvh> for Dimension

Source§

fn from(value: Dvh) -> Self

Converts to this type from the input type.
Source§

impl From<Dvi> for Dimension

Source§

fn from(value: Dvi) -> Self

Converts to this type from the input type.
Source§

impl From<Dvmax> for Dimension

Source§

fn from(value: Dvmax) -> Self

Converts to this type from the input type.
Source§

impl From<Dvmin> for Dimension

Source§

fn from(value: Dvmin) -> Self

Converts to this type from the input type.
Source§

impl From<Dvw> for Dimension

Source§

fn from(value: Dvw) -> Self

Converts to this type from the input type.
Source§

impl From<Em> for Dimension

Source§

fn from(value: Em) -> Self

Converts to this type from the input type.
Source§

impl From<Ex> for Dimension

Source§

fn from(value: Ex) -> Self

Converts to this type from the input type.
Source§

impl From<FontLength> for Dimension

Source§

fn from(value: FontLength) -> Self

Converts to this type from the input type.
Source§

impl From<Frequency> for Dimension

Source§

fn from(value: Frequency) -> Self

Converts to this type from the input type.
Source§

impl From<Hz> for Dimension

Source§

fn from(value: Hz) -> Self

Converts to this type from the input type.
Source§

impl From<Ic> for Dimension

Source§

fn from(value: Ic) -> Self

Converts to this type from the input type.
Source§

impl From<In> for Dimension

Source§

fn from(value: In) -> Self

Converts to this type from the input type.
Source§

impl From<Khz> for Dimension

Source§

fn from(value: Khz) -> Self

Converts to this type from the input type.
Source§

impl From<Length> for Dimension

Source§

fn from(value: Length) -> Self

Converts to this type from the input type.
Source§

impl From<Lh> for Dimension

Source§

fn from(value: Lh) -> Self

Converts to this type from the input type.
Source§

impl From<Lvb> for Dimension

Source§

fn from(value: Lvb) -> Self

Converts to this type from the input type.
Source§

impl From<Lvh> for Dimension

Source§

fn from(value: Lvh) -> Self

Converts to this type from the input type.
Source§

impl From<Lvi> for Dimension

Source§

fn from(value: Lvi) -> Self

Converts to this type from the input type.
Source§

impl From<Lvmax> for Dimension

Source§

fn from(value: Lvmax) -> Self

Converts to this type from the input type.
Source§

impl From<Lvmin> for Dimension

Source§

fn from(value: Lvmin) -> Self

Converts to this type from the input type.
Source§

impl From<Lvw> for Dimension

Source§

fn from(value: Lvw) -> Self

Converts to this type from the input type.
Source§

impl From<Mm> for Dimension

Source§

fn from(value: Mm) -> Self

Converts to this type from the input type.
Source§

impl From<Ms> for Dimension

Source§

fn from(value: Ms) -> Self

Converts to this type from the input type.
Source§

impl From<Pc> for Dimension

Source§

fn from(value: Pc) -> Self

Converts to this type from the input type.
Source§

impl From<Pt> for Dimension

Source§

fn from(value: Pt) -> Self

Converts to this type from the input type.
Source§

impl From<Px> for Dimension

Source§

fn from(value: Px) -> Self

Converts to this type from the input type.
Source§

impl From<Q> for Dimension

Source§

fn from(value: Q) -> Self

Converts to this type from the input type.
Source§

impl From<Rcap> for Dimension

Source§

fn from(value: Rcap) -> Self

Converts to this type from the input type.
Source§

impl From<Rch> for Dimension

Source§

fn from(value: Rch) -> Self

Converts to this type from the input type.
Source§

impl From<RelativeLength> for Dimension

Source§

fn from(value: RelativeLength) -> Self

Converts to this type from the input type.
Source§

impl From<Rem> for Dimension

Source§

fn from(value: Rem) -> Self

Converts to this type from the input type.
Source§

impl From<Resolution> for Dimension

Source§

fn from(value: Resolution) -> Self

Converts to this type from the input type.
Source§

impl From<Rex> for Dimension

Source§

fn from(value: Rex) -> Self

Converts to this type from the input type.
Source§

impl From<Ric> for Dimension

Source§

fn from(value: Ric) -> Self

Converts to this type from the input type.
Source§

impl From<Rlh> for Dimension

Source§

fn from(value: Rlh) -> Self

Converts to this type from the input type.
Source§

impl From<S> for Dimension

Source§

fn from(value: S) -> Self

Converts to this type from the input type.
Source§

impl From<Svb> for Dimension

Source§

fn from(value: Svb) -> Self

Converts to this type from the input type.
Source§

impl From<Svh> for Dimension

Source§

fn from(value: Svh) -> Self

Converts to this type from the input type.
Source§

impl From<Svi> for Dimension

Source§

fn from(value: Svi) -> Self

Converts to this type from the input type.
Source§

impl From<Svmax> for Dimension

Source§

fn from(value: Svmax) -> Self

Converts to this type from the input type.
Source§

impl From<Svmin> for Dimension

Source§

fn from(value: Svmin) -> Self

Converts to this type from the input type.
Source§

impl From<Svw> for Dimension

Source§

fn from(value: Svw) -> Self

Converts to this type from the input type.
Source§

impl From<Time> for Dimension

Source§

fn from(value: Time) -> Self

Converts to this type from the input type.
Source§

impl From<Vb> for Dimension

Source§

fn from(value: Vb) -> Self

Converts to this type from the input type.
Source§

impl From<Vh> for Dimension

Source§

fn from(value: Vh) -> Self

Converts to this type from the input type.
Source§

impl From<Vi> for Dimension

Source§

fn from(value: Vi) -> Self

Converts to this type from the input type.
Source§

impl From<ViewportLength> for Dimension

Source§

fn from(value: ViewportLength) -> Self

Converts to this type from the input type.
Source§

impl From<Vmax> for Dimension

Source§

fn from(value: Vmax) -> Self

Converts to this type from the input type.
Source§

impl From<Vmin> for Dimension

Source§

fn from(value: Vmin) -> Self

Converts to this type from the input type.
Source§

impl From<Vw> for Dimension

Source§

fn from(value: Vw) -> Self

Converts to this type from the input type.
Source§

impl HertzStorage for Dimension

Source§

fn hz(value: f64) -> Self
where Self: Sized,

Use a CSS unit "hz" (Hz) as value to store. Read more
Source§

impl IcStorage for Dimension

Source§

fn ic(value: isize) -> Self
where Self: Sized,

Use a CSS unit "ic" (Ic) as value to store. Read more
Source§

impl InchStorage for Dimension

Source§

fn in(value: f64) -> Self
where Self: Sized,

Use a CSS unit "in" (In) as value to store. Read more
Source§

impl KilohertzStorage for Dimension

Source§

fn khz(value: f64) -> Self
where Self: Sized,

Use a CSS unit "khz" (Khz) as value to store. Read more
Source§

impl LargeViewportBlockStorage for Dimension

Source§

fn lvb(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lvb" (Lvb) as value to store. Read more
Source§

impl LargeViewportHeightStorage for Dimension

Source§

fn lvh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lvh" (Lvh) as value to store. Read more
Source§

impl LargeViewportInlineStorage for Dimension

Source§

fn lvi(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lvi" (Lvi) as value to store. Read more
Source§

impl LargeViewportMaxStorage for Dimension

Source§

fn lvmax(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lvmax" (Lvmax) as value to store. Read more
Source§

impl LargeViewportMinStorage for Dimension

Source§

fn lvmin(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lvmin" (Lvmin) as value to store. Read more
Source§

impl LargeViewportWidthStorage for Dimension

Source§

fn lvw(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lvw" (Lvw) as value to store. Read more
Source§

impl LengthStorage for Dimension

Source§

fn length(value: Length) -> Self
where Self: Sized,

Source§

impl LineHeightStorage for Dimension

Source§

fn lh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "lh" (Lh) as value to store. Read more
Source§

impl MillimeterStorage for Dimension

Source§

fn mm(value: f64) -> Self
where Self: Sized,

Use a CSS unit "mm" (Mm) as value to store. Read more
Source§

impl MillisecondStorage for Dimension

Source§

fn ms(value: usize) -> Self
where Self: Sized,

Use a CSS unit "ms" (Ms) as value to store. Read more
Source§

impl PartialEq for Dimension

Source§

fn eq(&self, other: &Dimension) -> 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 PicaStorage for Dimension

Source§

fn pc(value: isize) -> Self
where Self: Sized,

Use a CSS unit "pc" (Pc) as value to store. Read more
Source§

impl PixelStorage for Dimension

Source§

fn px(value: isize) -> Self
where Self: Sized,

Use a CSS unit "px" (Px) as value to store. Read more
Source§

impl PointStorage for Dimension

Source§

fn pt(value: isize) -> Self
where Self: Sized,

Use a CSS unit "pt" (Pt) as value to store. Read more
Source§

impl QuarterOfMillimeterStorage for Dimension

Source§

fn q(value: isize) -> Self
where Self: Sized,

Use a CSS unit "q" (Q) as value to store. Read more
Source§

impl RelativeCapHeightStorage for Dimension

Source§

fn rcap(value: f64) -> Self
where Self: Sized,

Use a CSS unit "rcap" (Rcap) as value to store. Read more
Source§

impl RelativeCharSizeStorage for Dimension

Source§

fn rch(value: isize) -> Self
where Self: Sized,

Use a CSS unit "rch" (Rch) as value to store. Read more
Source§

impl RelativeEmStorage for Dimension

Source§

fn rem(value: f64) -> Self
where Self: Sized,

Use a CSS unit "rem" (Rem) as value to store. Read more
Source§

impl RelativeExStorage for Dimension

Source§

fn rex(value: f64) -> Self
where Self: Sized,

Use a CSS unit "rex" (Rex) as value to store. Read more
Source§

impl RelativeIcStorage for Dimension

Source§

fn ric(value: isize) -> Self
where Self: Sized,

Use a CSS unit "ric" (Ric) as value to store. Read more
Source§

impl RelativeLengthStorage for Dimension

Source§

fn relative_length(value: RelativeLength) -> Self
where Self: Sized,

Source§

impl RelativeLineHeightStorage for Dimension

Source§

fn rlh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "rlh" (Rlh) as value to store. Read more
Source§

impl ResolutionStorage for Dimension

Source§

fn resolution(value: Resolution) -> Self
where Self: Sized,

Source§

impl SecondStorage for Dimension

Source§

fn s(value: f64) -> Self
where Self: Sized,

Use a CSS unit "s" (S) as value to store. Read more
Source§

impl SmallViewportBlockStorage for Dimension

Source§

fn svb(value: f64) -> Self
where Self: Sized,

Use a CSS unit "svb" (Svb) as value to store. Read more
Source§

impl SmallViewportHeightStorage for Dimension

Source§

fn svh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "svh" (Svh) as value to store. Read more
Source§

impl SmallViewportInlineStorage for Dimension

Source§

fn svi(value: f64) -> Self
where Self: Sized,

Use a CSS unit "svi" (Svi) as value to store. Read more
Source§

impl SmallViewportMaxStorage for Dimension

Source§

fn svmax(value: f64) -> Self
where Self: Sized,

Use a CSS unit "svmax" (Svmax) as value to store. Read more
Source§

impl SmallViewportMinStorage for Dimension

Source§

fn svmin(value: f64) -> Self
where Self: Sized,

Use a CSS unit "svmin" (Svmin) as value to store. Read more
Source§

impl SmallViewportWidthStorage for Dimension

Source§

fn svw(value: f64) -> Self
where Self: Sized,

Use a CSS unit "svw" (Svw) as value to store. Read more
Source§

impl TimeStorage for Dimension

Source§

fn time(value: Time) -> Self
where Self: Sized,

Source§

impl ViewportBlockStorage for Dimension

Source§

fn vb(value: f64) -> Self
where Self: Sized,

Use a CSS unit "vb" (Vb) as value to store. Read more
Source§

impl ViewportHeightStorage for Dimension

Source§

fn vh(value: f64) -> Self
where Self: Sized,

Use a CSS unit "vh" (Vh) as value to store. Read more
Source§

impl ViewportInlineStorage for Dimension

Source§

fn vi(value: f64) -> Self
where Self: Sized,

Use a CSS unit "vi" (Vi) as value to store. Read more
Source§

impl ViewportLengthStorage for Dimension

Source§

fn viewport_length(value: ViewportLength) -> Self
where Self: Sized,

Source§

impl ViewportMaxStorage for Dimension

Source§

fn vmax(value: f64) -> Self
where Self: Sized,

Use a CSS unit "vmax" (Vmax) as value to store. Read more
Source§

impl ViewportMinStorage for Dimension

Source§

fn vmin(value: f64) -> Self
where Self: Sized,

Use a CSS unit "vmin" (Vmin) as value to store. Read more
Source§

impl ViewportWidthStorage for Dimension

Source§

fn vw(value: f64) -> Self
where Self: Sized,

Use a CSS unit "vw" (Vw) as value to store. Read more
Source§

impl StructuralPartialEq for Dimension

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.