#[non_exhaustive]pub enum UnitType {
Pixel,
Em,
Mm,
Point,
Cm,
}
Expand description
The type of unit in which a value is expressed
This enumeration might be expanded at later date
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Pixel
Unit expressed in pixels (with subpixel precision)
Em
Unit expressed in em
Mm
Unit expressed in millimeters
Point
Unit expressed in points
Cm
Unit expressed in centimeters
Trait Implementations§
Source§impl<'a> FromValue<'a> for UnitType
impl<'a> FromValue<'a> for UnitType
Source§unsafe fn from_value(value: &Value) -> Self
unsafe fn from_value(value: &Value) -> Self
Safety Read more
Source§impl<'a> FromValueOptional<'a> for UnitType
impl<'a> FromValueOptional<'a> for UnitType
Source§impl Ord for UnitType
impl Ord for UnitType
Source§impl PartialOrd for UnitType
impl PartialOrd for UnitType
Source§impl StaticType for UnitType
impl StaticType for UnitType
Source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Copy for UnitType
impl Eq for UnitType
impl StructuralPartialEq for UnitType
Auto Trait Implementations§
impl Freeze for UnitType
impl RefUnwindSafe for UnitType
impl Send for UnitType
impl Sync for UnitType
impl Unpin for UnitType
impl UnwindSafe for UnitType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.