Struct tailwind_parse::Literal
source · pub struct Literal<'a> {
pub cmd: Plugin,
pub value: Option<SubjectValue<'a>>,
pub span: Option<Span>,
}
Expand description
The core ‘rule’ of a tailwind directive.
Example: text-2xl
is a Plugin
with a value of 2xl
.
Fields§
§cmd: Plugin
§value: Option<SubjectValue<'a>>
§span: Option<Span>
Implementations§
source§impl<'a> Literal<'a>
impl<'a> Literal<'a>
sourcepub fn to_object_lit(
self,
_span: Span,
theme: &'a TailwindTheme<'_>,
alpha: &Option<Value<'_>>
) -> Result<ObjectLit, LiteralConversionError<'a>>
pub fn to_object_lit( self, _span: Span, theme: &'a TailwindTheme<'_>, alpha: &Option<Value<'_>> ) -> Result<ObjectLit, LiteralConversionError<'a>>
Takes the combination of a plugin and a value and converts it into a javascript object literal with the equivalent css.
Trait Implementations§
source§impl<'a> PartialEq<Literal<'a>> for Literal<'a>
impl<'a> PartialEq<Literal<'a>> for Literal<'a>
impl<'a> Eq for Literal<'a>
impl<'a> StructuralEq for Literal<'a>
impl<'a> StructuralPartialEq for Literal<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Literal<'a>
impl<'a> Send for Literal<'a>
impl<'a> Sync for Literal<'a>
impl<'a> Unpin for Literal<'a>
impl<'a> UnwindSafe for Literal<'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
Mutably borrows from an owned value. Read more