Enum LeftItem

Source
pub enum LeftItem<'a, 'f> {
    Ident(Spanned<'f, Ident<'a, 'f>>),
    Tuple(Spanned<'f, Vec<LeftItem<'a, 'f>>>),
    Field(Box<Spanned<'f, LeftItem<'a, 'f>>>, Spanned<'f, Ident<'a, 'f>>),
    ArrayIndex(Box<Spanned<'f, LeftItem<'a, 'f>>>, Spanned<'f, Expr<'a, 'f>>),
    ArraySlice(Box<Spanned<'f, LeftItem<'a, 'f>>>, Spanned<'f, Expr<'a, 'f>>, Spanned<'f, Expr<'a, 'f>>, Option<Spanned<'f, Expr<'a, 'f>>>),
}
Expand description

The left side of an equation

Variants§

§

Ident(Spanned<'f, Ident<'a, 'f>>)

Identifier

§

Tuple(Spanned<'f, Vec<LeftItem<'a, 'f>>>)

Tuple, made of many smaller left items

§

Field(Box<Spanned<'f, LeftItem<'a, 'f>>>, Spanned<'f, Ident<'a, 'f>>)

A field access (my_struct.my_field = …)

Tuple Fields

§0: Box<Spanned<'f, LeftItem<'a, 'f>>>

The structure

§1: Spanned<'f, Ident<'a, 'f>>

The field name

§

ArrayIndex(Box<Spanned<'f, LeftItem<'a, 'f>>>, Spanned<'f, Expr<'a, 'f>>)

Array index

Tuple Fields

§0: Box<Spanned<'f, LeftItem<'a, 'f>>>

The table

§1: Spanned<'f, Expr<'a, 'f>>

The index

§

ArraySlice(Box<Spanned<'f, LeftItem<'a, 'f>>>, Spanned<'f, Expr<'a, 'f>>, Spanned<'f, Expr<'a, 'f>>, Option<Spanned<'f, Expr<'a, 'f>>>)

Array slice

Tuple Fields

§0: Box<Spanned<'f, LeftItem<'a, 'f>>>

The array

§1: Spanned<'f, Expr<'a, 'f>>

Start

§2: Spanned<'f, Expr<'a, 'f>>

End

§3: Option<Spanned<'f, Expr<'a, 'f>>>

Step

Trait Implementations§

Source§

impl<'a, 'f> Debug for LeftItem<'a, 'f>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'f> Freeze for LeftItem<'a, 'f>

§

impl<'a, 'f> RefUnwindSafe for LeftItem<'a, 'f>

§

impl<'a, 'f> Send for LeftItem<'a, 'f>

§

impl<'a, 'f> Sync for LeftItem<'a, 'f>

§

impl<'a, 'f> Unpin for LeftItem<'a, 'f>

§

impl<'a, 'f> UnwindSafe for LeftItem<'a, 'f>

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>,

Source§

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>,

Source§

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.