Enum ilex::rule::Any

source ·
pub enum Any {
    Keyword(Keyword),
    Bracket(Bracket),
    Ident(Ident),
    Quoted(Quoted),
    Comment(Comment),
    Digital(Digital),
}
Expand description

Any of the possible rule types in a Spec.

Variants§

§

Keyword(Keyword)

§

Bracket(Bracket)

§

Ident(Ident)

§

Quoted(Quoted)

§

Comment(Comment)

§

Digital(Digital)

Trait Implementations§

source§

impl Debug for Any

source§

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

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

impl From<Bracket> for Any

source§

fn from(value: Bracket) -> Self

Converts to this type from the input type.
source§

impl From<Comment> for Any

source§

fn from(value: Comment) -> Self

Converts to this type from the input type.
source§

impl From<Digital> for Any

source§

fn from(value: Digital) -> Self

Converts to this type from the input type.
source§

impl From<Eof> for Any

source§

fn from(value: Eof) -> Self

Converts to this type from the input type.
source§

impl From<Ident> for Any

source§

fn from(value: Ident) -> Self

Converts to this type from the input type.
source§

impl From<Keyword> for Any

source§

fn from(value: Keyword) -> Self

Converts to this type from the input type.
source§

impl From<Never> for Any

source§

fn from(value: Never) -> Self

Converts to this type from the input type.
source§

impl From<Quoted> for Any

source§

fn from(value: Quoted) -> Self

Converts to this type from the input type.
source§

impl Rule for Any

§

type Token<'lex> = Any<'lex>

This rule’s corresponding token type. Read more
source§

fn try_from_ref(value: &Any) -> Result<&Self, WrongKind>

Converts a reference to Any to a reference to this kind of rule.
source§

impl TryFrom<Any> for Bracket

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Comment

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Digital

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Eof

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Ident

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Keyword

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Never

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Any> for Quoted

§

type Error = WrongKind

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

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl RefUnwindSafe for Any

§

impl Send for Any

§

impl Sync for Any

§

impl Unpin for Any

§

impl UnwindSafe for Any

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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, U> Into<U> for T
where 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, U> TryFrom<U> for T
where 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 T
where 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.