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 more
sourceimpl Debug for NumericValue
impl Debug for NumericValue
sourceimpl Display for NumericValue
impl Display 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 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