pub enum Expression<'src> {
Show 13 variants
Block(Box<Block<'src>>),
If(Box<IfExpr<'src>>),
Int(Spanned<'src, i64>),
Float(Spanned<'src, f64>),
Bool(Spanned<'src, bool>),
Char(Spanned<'src, u8>),
Ident(Spanned<'src, &'src str>),
Prefix(Box<PrefixExpr<'src>>),
Infix(Box<InfixExpr<'src>>),
Assign(Box<AssignExpr<'src>>),
Call(Box<CallExpr<'src>>),
Cast(Box<CastExpr<'src>>),
Grouped(Spanned<'src, Box<Expression<'src>>>),
}
Variants§
Block(Box<Block<'src>>)
If(Box<IfExpr<'src>>)
Int(Spanned<'src, i64>)
Float(Spanned<'src, f64>)
Bool(Spanned<'src, bool>)
Char(Spanned<'src, u8>)
Ident(Spanned<'src, &'src str>)
Prefix(Box<PrefixExpr<'src>>)
Infix(Box<InfixExpr<'src>>)
Assign(Box<AssignExpr<'src>>)
Call(Box<CallExpr<'src>>)
Cast(Box<CastExpr<'src>>)
Grouped(Spanned<'src, Box<Expression<'src>>>)
Implementations§
Trait Implementations§
Source§impl<'src> Clone for Expression<'src>
impl<'src> Clone for Expression<'src>
Source§fn clone(&self) -> Expression<'src>
fn clone(&self) -> Expression<'src>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'src> Debug for Expression<'src>
impl<'src> Debug for Expression<'src>
Source§impl<'src> PartialEq for Expression<'src>
impl<'src> PartialEq for Expression<'src>
impl<'src> StructuralPartialEq for Expression<'src>
Auto Trait Implementations§
impl<'src> Freeze for Expression<'src>
impl<'src> RefUnwindSafe for Expression<'src>
impl<'src> Send for Expression<'src>
impl<'src> Sync for Expression<'src>
impl<'src> Unpin for Expression<'src>
impl<'src> UnwindSafe for Expression<'src>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more