Enum tailwind_parse::Plugin
source · pub enum Plugin {
Show 100 variants
Position(Position),
Visibility(Visibility),
Display(Display),
TextTransform(TextTransform),
TextDecoration(TextDecoration),
Border(Option<Border>),
Rounded(Option<Rounded>),
Min(Min),
Max(Max),
List(List),
H,
W,
Decoration,
P,
Px,
Pl,
Auto(Auto),
Pr,
LineClamp,
Py,
Pt,
VerticalAlign,
Pb,
Content(Option<Content>),
M,
Mx,
My,
Ml,
Backdrop(Backdrop),
Stroke,
Mr,
Mt,
TransformOrigin,
Mb,
Z,
Text(Option<Text>),
Accent,
Caret,
Bg(Option<Bg>),
Font,
Fill,
Shadow,
Transition,
Placeholder,
Inset(Option<Inset>),
Delay,
Snap(Snap),
Duration,
Divide(Option<Divide>),
Rotate,
Appearance,
Truncate,
Animate,
Pointer,
Aspect,
Ease,
Order,
Whitespace(Whitespace),
From,
To,
Outline,
Mix,
Flex(Option<Flex>),
Grid(Option<Grid>),
Col(Option<Col>),
Row(Option<Row>),
Float,
Grow,
Shrink,
Basis,
Object(Object),
Justify,
Items,
Leading,
Gap(Option<Gap>),
Cursor,
Antialiased,
Scroll(Scroll),
Scale,
Box,
Select,
Overflow(Option<Overflow>),
Top,
Bottom,
Left,
Right,
AlignSelf(AlignSelf),
Translate(Translate),
Tracking,
Invert,
Space,
Transform,
Opacity,
Italic,
Blur,
Ring(Option<Ring>),
Sr,
Columns,
Prose(Option<Prose>),
Not(Not),
}
Expand description
The plugin represents the core command the tailwind parser is
looking for. For example, the text
plugin is represented by
the Text
variant.
Variants§
Position(Position)
Transparent plugins do not add to the class name.
Example: ‘sticky’, ‘static’, ‘fixed’
Visibility(Visibility)
Display(Display)
TextTransform(TextTransform)
TextDecoration(TextDecoration)
Border(Option<Border>)
Border has an optional sub-item
Example: ‘border’, ‘border-t’, ‘border-b’, ‘border-l’, ‘border-r’
Rounded(Option<Rounded>)
Min(Min)
Max(Max)
List(List)
H
W
Decoration
P
Px
Pl
Auto(Auto)
Pr
LineClamp
Py
Pt
VerticalAlign
Pb
Content(Option<Content>)
M
Mx
My
Ml
Backdrop(Backdrop)
Stroke
Mr
Mt
TransformOrigin
Mb
Z
Text(Option<Text>)
Accent
Caret
Bg(Option<Bg>)
Font
Fill
Shadow
Transition
Placeholder
Inset(Option<Inset>)
Delay
Snap(Snap)
Duration
Divide(Option<Divide>)
Rotate
Appearance
Truncate
Animate
Pointer
Aspect
Ease
Order
Whitespace(Whitespace)
From
To
Outline
Mix
Flex(Option<Flex>)
Grid(Option<Grid>)
Col(Option<Col>)
Row(Option<Row>)
Float
Grow
Shrink
Basis
Object(Object)
Justify
Items
Leading
Gap(Option<Gap>)
Cursor
Antialiased
Scroll(Scroll)
Scale
Box
Select
Overflow(Option<Overflow>)
Top
Bottom
Left
Right
AlignSelf(AlignSelf)
Translate(Translate)
Tracking
Invert
Space
Transform
Opacity
Italic
Blur
Ring(Option<Ring>)
Sr
Columns
Prose(Option<Prose>)
Not(Not)
Implementations§
source§impl<'a> Plugin
impl<'a> Plugin
sourcepub fn parse(s: NomSpan<'a>) -> IResult<NomSpan<'a>, Self, Error<NomSpan<'a>>>
pub fn parse(s: NomSpan<'a>) -> IResult<NomSpan<'a>, Self, Error<NomSpan<'a>>>
At a hight level, this algorithm:
- take a segment of the input
- if it has a sub-segment, attempt to parse a plugin from the two
- if it doesn’t have a sub-segment, attempt to parse a plugin from the segment
- if that plugin has subcommands, attempt to parse a subcommand from the sub-segment
this code is ugly
source§impl Plugin
impl Plugin
pub const fn max_dashes() -> usize
pub fn has_subcommand(&self) -> bool
pub fn has_subsegments(name: &str) -> bool
Trait Implementations§
source§impl PartialEq<Plugin> for Plugin
impl PartialEq<Plugin> for Plugin
impl Copy for Plugin
impl Eq for Plugin
impl StructuralEq for Plugin
impl StructuralPartialEq for Plugin
Auto Trait Implementations§
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnwindSafe for Plugin
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