#[non_exhaustive]pub enum UnOp {
Minus(TokenReference),
Not(TokenReference),
Hash(TokenReference),
Tilde(TokenReference),
}
Expand description
Operators that require just one operand, such as #X
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Minus(TokenReference)
Not(TokenReference)
Hash(TokenReference)
Tilde(TokenReference)
Available on crate feature
lua53
only.Implementations§
source§impl UnOp
impl UnOp
sourcepub fn precedence(&self) -> u8
Available on crate feature lua53
only.
pub fn precedence(&self) -> u8
lua53
only.The precedence of the operator, from a scale of 1 to 11. The larger the number, the higher the precedence. See more at https://www.lua.org/manual/5.3/manual.html#2.5.6
sourcepub fn token(&self) -> &TokenReference
pub fn token(&self) -> &TokenReference
The token associated with the operator
Trait Implementations§
source§impl<'de> Deserialize<'de> for UnOp
impl<'de> Deserialize<'de> for UnOp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Node for UnOp
impl Node for UnOp
source§fn start_position(&self) -> Option<Position>
fn start_position(&self) -> Option<Position>
The start position of a node. None if can’t be determined
source§fn end_position(&self) -> Option<Position>
fn end_position(&self) -> Option<Position>
The end position of a node. None if it can’t be determined
source§fn similar(&self, other: &Self) -> bool
fn similar(&self, other: &Self) -> bool
Whether another node of the same type is the same as this one semantically, ignoring position
source§impl PartialEq for UnOp
impl PartialEq for UnOp
impl Eq for UnOp
impl StructuralEq for UnOp
impl StructuralPartialEq for UnOp
Auto Trait Implementations§
impl RefUnwindSafe for UnOp
impl Send for UnOp
impl Sync for UnOp
impl Unpin for UnOp
impl UnwindSafe for UnOp
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