Enum tailwind_css::LengthUnit
source · [−]Variants
Fraction(u32, u32)
Unit(f32, &'static str)
Implementations
sourceimpl LengthUnit
impl LengthUnit
sourcepub fn parse_faction(input: &str) -> Result<Self>
pub fn parse_faction(input: &str) -> Result<Self>
pub fn parse_length(input: &str) -> Result<Self>
pub fn parse_angle(input: &str) -> Result<Self>
pub fn px(x: f32) -> Self
pub fn em(x: f32) -> Self
pub fn rem(x: f32) -> Self
pub fn percent(x: f32) -> Self
pub fn radio(a: u32, b: u32) -> Self
sourceimpl LengthUnit
impl LengthUnit
pub fn get_class(&self) -> String
pub fn get_class_arbitrary(&self) -> String
pub fn get_properties(&self) -> String
pub fn is_fraction(&self) -> bool
pub fn is_fraction_eq(&self) -> bool
pub fn is_fraction_zero(&self) -> bool
Trait Implementations
sourceimpl Clone for LengthUnit
impl Clone for LengthUnit
sourcefn clone(&self) -> LengthUnit
fn clone(&self) -> LengthUnit
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LengthUnit
impl Debug for LengthUnit
sourceimpl Display for LengthUnit
impl Display for LengthUnit
sourceimpl From<LengthUnit> for UnitValue
impl From<LengthUnit> for UnitValue
sourcefn from(n: LengthUnit) -> Self
fn from(n: LengthUnit) -> Self
Converts to this type from the input type.
impl Copy for LengthUnit
Auto Trait Implementations
impl RefUnwindSafe for LengthUnit
impl Send for LengthUnit
impl Sync for LengthUnit
impl Unpin for LengthUnit
impl UnwindSafe for LengthUnit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more