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

source

pub fn parse(s: NomSpan<'a>) -> IResult<NomSpan<'a>, Self, Error<NomSpan<'a>>>

At a hight level, this algorithm:

  1. take a segment of the input
  2. if it has a sub-segment, attempt to parse a plugin from the two
  3. if it doesn’t have a sub-segment, attempt to parse a plugin from the segment
  4. if that plugin has subcommands, attempt to parse a subcommand from the sub-segment

this code is ugly

source§

impl Plugin

source

pub const fn max_dashes() -> usize

source

pub fn has_subcommand(&self) -> bool

source

pub fn has_subsegments(name: &str) -> bool

Trait Implementations§

source§

impl Clone for Plugin

source§

fn clone(&self) -> Plugin

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Plugin

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromStr for Plugin

§

type Err = ()

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq<Plugin> for Plugin

source§

fn eq(&self, other: &Plugin) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Plugin

source§

impl Eq for Plugin

source§

impl StructuralEq for Plugin

source§

impl StructuralPartialEq for Plugin

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> Send for Twhere T: ?Sized,

§

impl<T> Sync for Twhere T: ?Sized,