Enum tailwind_css::NumericValue
source · pub enum NumericValue {
Number {
n: f32,
negative: bool,
can_be_negative: bool,
},
Keyword(String),
Arbitrary(TailwindArbitrary),
}
Expand description
Used to represent those attributes that only have integers
Variants§
Implementations§
source§impl NumericValue
impl NumericValue
pub fn get_properties(&self, number: impl FnOnce(&f32) -> String) -> String
pub fn write_negative(&self, f: &mut Formatter<'_>) -> Result
pub fn write_class(&self, f: &mut Formatter<'_>, before: &str) -> Result
source§impl NumericValue
impl NumericValue
pub fn negative_parser( id: &'static str, checker: impl Fn(&str) -> bool ) -> impl Fn(&[&str], &TailwindArbitrary, Negative) -> Result<Self>
pub fn positive_parser( id: &'static str, checker: impl Fn(&str) -> bool ) -> impl Fn(&[&str], &TailwindArbitrary) -> Result<Self>
pub fn parse_arbitrary(arbitrary: &TailwindArbitrary) -> Result<Self>
pub fn parse_number(n: &str, negative: Negative) -> Result<Self>
Trait Implementations§
source§impl Clone for NumericValue
impl Clone for NumericValue
source§fn clone(&self) -> NumericValue
fn clone(&self) -> NumericValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NumericValue
impl Debug for NumericValue
source§impl Display for NumericValue
impl Display for NumericValue
source§impl From<&str> for NumericValue
impl From<&str> for NumericValue
source§impl From<String> for NumericValue
impl From<String> for NumericValue
source§impl From<i32> for NumericValue
impl From<i32> for NumericValue
Auto Trait Implementations§
impl RefUnwindSafe for NumericValue
impl Send for NumericValue
impl Sync for NumericValue
impl Unpin for NumericValue
impl UnwindSafe for NumericValue
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