pub enum KeywordClassFormat<'a> {
CustomClassname(&'a str),
AddAsSuffixCustom(&'a str),
AddAsSuffix,
InvalidKeyword,
}Expand description
Describes an instruction for the write_class function on how to format a CSS classname.
Variants§
CustomClassname(&'a str)
Writes a completely custom classname, ignoring the class_prefix.
§Example
Given a class_prefix of "prefix-", returning CustomClassname("isolate")
will result in the final classname: isolate.
AddAsSuffixCustom(&'a str)
Appends a specific, transformed string to the class_prefix.
§Example
Given a class_prefix of "prefix-" and an input of "column-dense", returning
AddAsSuffixCustom("col-dense") results in the final classname: prefix-col-dense.
AddAsSuffix
Appends the original, untransformed keyword to the class_prefix.
§Example
Given a class_prefix of "prefix-" and an input of "auto", returning
AddAsSuffix results in the final classname: prefix-auto.
InvalidKeyword
Indicates the keyword is invalid, causing write_class to return a formatting error.
Trait Implementations§
Source§impl<'a> Clone for KeywordClassFormat<'a>
impl<'a> Clone for KeywordClassFormat<'a>
Source§fn clone(&self) -> KeywordClassFormat<'a>
fn clone(&self) -> KeywordClassFormat<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for KeywordClassFormat<'a>
impl<'a> RefUnwindSafe for KeywordClassFormat<'a>
impl<'a> Send for KeywordClassFormat<'a>
impl<'a> Sync for KeywordClassFormat<'a>
impl<'a> Unpin for KeywordClassFormat<'a>
impl<'a> UnwindSafe for KeywordClassFormat<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more