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
Number
Keyword(String)
Arbitrary(TailwindArbitrary)
Implementations
sourceimpl 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
sourceimpl 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
sourceimpl Clone for NumericValue
impl Clone for NumericValue
sourcefn clone(&self) -> NumericValue
fn clone(&self) -> NumericValue
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 NumericValue
impl Debug for NumericValue
sourceimpl Display for NumericValue
impl Display for NumericValue
sourceimpl From<&str> for NumericValue
impl From<&str> for NumericValue
sourceimpl From<String> for NumericValue
impl From<String> for NumericValue
sourceimpl 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
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