pub struct PrefixExpression {
pub token: Token,
pub operator: SmartString,
pub op_type: PrefixOperator,
pub right: Box<Expression>,
}Expand description
Prefix expression (-x, NOT x)
Fields§
§token: Token§operator: SmartString§op_type: PrefixOperatorPre-computed operator type for fast evaluation (no string comparison)
right: Box<Expression>Implementations§
Source§impl PrefixExpression
impl PrefixExpression
Sourcepub fn new(
token: Token,
operator: impl Into<SmartString>,
right: Box<Expression>,
) -> Self
pub fn new( token: Token, operator: impl Into<SmartString>, right: Box<Expression>, ) -> Self
Create a new prefix expression with auto-computed op_type
Trait Implementations§
Source§impl Clone for PrefixExpression
impl Clone for PrefixExpression
Source§fn clone(&self) -> PrefixExpression
fn clone(&self) -> PrefixExpression
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrefixExpression
impl Debug for PrefixExpression
Source§impl Display for PrefixExpression
impl Display for PrefixExpression
Source§impl PartialEq for PrefixExpression
impl PartialEq for PrefixExpression
impl StructuralPartialEq for PrefixExpression
Auto Trait Implementations§
impl Freeze for PrefixExpression
impl RefUnwindSafe for PrefixExpression
impl Send for PrefixExpression
impl Sync for PrefixExpression
impl Unpin for PrefixExpression
impl UnsafeUnpin for PrefixExpression
impl UnwindSafe for PrefixExpression
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> CompactArcDrop for T
impl<T> CompactArcDrop for T
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