Struct foundry_compilers::artifacts::ast::UnaryOperation
source · pub struct UnaryOperation {
pub id: usize,
pub src: SourceLocation,
pub argument_types: Vec<TypeDescriptions>,
pub is_constant: bool,
pub is_l_value: bool,
pub is_pure: bool,
pub l_value_requested: bool,
pub type_descriptions: TypeDescriptions,
pub operator: UnaryOperator,
pub prefix: bool,
pub sub_expression: Expression,
}Expand description
A unary operation.
Fields§
§id: usize§src: SourceLocation§argument_types: Vec<TypeDescriptions>§is_constant: bool§is_l_value: bool§is_pure: bool§l_value_requested: bool§type_descriptions: TypeDescriptions§operator: UnaryOperator§prefix: boolWhether the unary operator is before or after the expression (e.g. x++ vs. ++x)
sub_expression: ExpressionTrait Implementations§
source§impl Clone for UnaryOperation
impl Clone for UnaryOperation
source§fn clone(&self) -> UnaryOperation
fn clone(&self) -> UnaryOperation
Returns a copy 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 UnaryOperation
impl Debug for UnaryOperation
source§impl<'de> Deserialize<'de> for UnaryOperation
impl<'de> Deserialize<'de> for UnaryOperation
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 PartialEq for UnaryOperation
impl PartialEq for UnaryOperation
source§fn eq(&self, other: &UnaryOperation) -> bool
fn eq(&self, other: &UnaryOperation) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for UnaryOperation
impl Serialize for UnaryOperation
impl Eq for UnaryOperation
impl StructuralPartialEq for UnaryOperation
Auto Trait Implementations§
impl Freeze for UnaryOperation
impl RefUnwindSafe for UnaryOperation
impl Send for UnaryOperation
impl Sync for UnaryOperation
impl Unpin for UnaryOperation
impl UnwindSafe for UnaryOperation
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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