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 more
sourceimpl 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
Performs the conversion.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more