Struct tailwind_parse::Directive
source · pub struct Directive<'a> {
pub exps: Vec<Expression<'a>>,
}
Expand description
A directive is a list of expressions separated by one or more spaces.
An example is: bg-red-500 text-white
Fields§
§exps: Vec<Expression<'a>>
Implementations§
source§impl<'a> Directive<'a>
impl<'a> Directive<'a>
sourcepub fn parse(
s: NomSpan<'a>
) -> (NomSpan<'a>, Self, Vec<LocatedSpan<&str, Span>>)
pub fn parse( s: NomSpan<'a> ) -> (NomSpan<'a>, Self, Vec<LocatedSpan<&str, Span>>)
Same as parse, but with an added check for an EOF.
sourcepub fn to_literal(
self,
config: &'a TailwindConfig<'_>
) -> (ObjectLit, Vec<ExpressionConversionError<'a>>)
pub fn to_literal( self, config: &'a TailwindConfig<'_> ) -> (ObjectLit, Vec<ExpressionConversionError<'a>>)
Attempts to parse a literal from the given directive,
Trait Implementations§
source§impl<'a> PartialEq<Directive<'a>> for Directive<'a>
impl<'a> PartialEq<Directive<'a>> for Directive<'a>
impl<'a> StructuralPartialEq for Directive<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Directive<'a>
impl<'a> Send for Directive<'a>
impl<'a> Sync for Directive<'a>
impl<'a> Unpin for Directive<'a>
impl<'a> UnwindSafe for Directive<'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