pub struct CssVariable {
pub name: String,
pub fallback: Option<String>,
}Expand description
Re-export core tailwind-rs functionality CSS variable reference
Fields§
§name: StringVariable name without – prefix
fallback: Option<String>Fallback value if variable is not defined
Implementations§
Source§impl CssVariable
impl CssVariable
Sourcepub fn new(name: String) -> CssVariable
pub fn new(name: String) -> CssVariable
Create a new CSS variable reference
Sourcepub fn with_fallback(name: String, fallback: String) -> CssVariable
pub fn with_fallback(name: String, fallback: String) -> CssVariable
Create a new CSS variable reference with fallback
Sourcepub fn to_css_value(&self) -> String
pub fn to_css_value(&self) -> String
Convert to CSS value
Sourcepub fn to_class_name(&self) -> String
pub fn to_class_name(&self) -> String
Convert to class name
Trait Implementations§
Source§impl Clone for CssVariable
impl Clone for CssVariable
Source§fn clone(&self) -> CssVariable
fn clone(&self) -> CssVariable
Returns a duplicate 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 CssVariable
impl Debug for CssVariable
Source§impl<'de> Deserialize<'de> for CssVariable
impl<'de> Deserialize<'de> for CssVariable
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CssVariable, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CssVariable, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CssVariable
impl Display for CssVariable
Source§impl Hash for CssVariable
impl Hash for CssVariable
Source§impl PartialEq for CssVariable
impl PartialEq for CssVariable
Source§impl Serialize for CssVariable
impl Serialize for CssVariable
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for CssVariable
impl StructuralPartialEq for CssVariable
Auto Trait Implementations§
impl Freeze for CssVariable
impl RefUnwindSafe for CssVariable
impl Send for CssVariable
impl Sync for CssVariable
impl Unpin for CssVariable
impl UnwindSafe for CssVariable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.