pub enum OperatorExpression {
LazyBoolean(LazyBooleanExpression),
CompoundAssignment(CompoundAssignmentExpression),
Borrow(BorrowExpression),
Dereference(DereferenceExpression),
TryPropagation(TryPropagationExpression),
Negation(NegationExpression),
ArithmeticOrLogical(ArithmeticOrLogicalExpression),
Comparison(ComparisonExpression),
TypeCast(TypeCastExpression),
Assignment(AssignmentExpression),
}Expand description
OperatorExpression
Variants§
LazyBoolean(LazyBooleanExpression)
CompoundAssignment(CompoundAssignmentExpression)
Borrow(BorrowExpression)
Dereference(DereferenceExpression)
TryPropagation(TryPropagationExpression)
Negation(NegationExpression)
ArithmeticOrLogical(ArithmeticOrLogicalExpression)
Comparison(ComparisonExpression)
TypeCast(TypeCastExpression)
Assignment(AssignmentExpression)
Trait Implementations§
Source§impl Clone for OperatorExpression
impl Clone for OperatorExpression
Source§fn clone(&self) -> OperatorExpression
fn clone(&self) -> OperatorExpression
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 OperatorExpression
impl Debug for OperatorExpression
Source§impl<'de> Deserialize<'de> for OperatorExpression
impl<'de> Deserialize<'de> for OperatorExpression
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 Format<WhitespaceConfig, ()> for OperatorExpression
impl Format<WhitespaceConfig, ()> for OperatorExpression
Source§fn format(
&mut self,
ctx: &mut Context<'_>,
prefix_ws: WhitespaceConfig,
args: (),
) -> FormatOutput
fn format( &mut self, ctx: &mut Context<'_>, prefix_ws: WhitespaceConfig, args: (), ) -> FormatOutput
Formats this type.
Source§impl Formattable for OperatorExpression
impl Formattable for OperatorExpression
Source§fn with_prefix_ws<WITH_PREFIX_WS_O>(
&mut self,
ctx: &mut Context<'_>,
f: &mut impl FnMut(&mut Whitespace, &mut Context<'_>) -> WITH_PREFIX_WS_O,
) -> Result<WITH_PREFIX_WS_O, ControlFlow<()>>
fn with_prefix_ws<WITH_PREFIX_WS_O>( &mut self, ctx: &mut Context<'_>, f: &mut impl FnMut(&mut Whitespace, &mut Context<'_>) -> WITH_PREFIX_WS_O, ) -> Result<WITH_PREFIX_WS_O, ControlFlow<()>>
Accesses the prefix whitespace of this type. Read more
Source§fn with_strings<WITH_STRINGS_O>(
&mut self,
ctx: &mut Context<'_>,
exclude_prefix_ws: bool,
f: &mut impl FnMut(&mut AstStr, &mut Context<'_>) -> ControlFlow<WITH_STRINGS_O>,
) -> ControlFlow<WITH_STRINGS_O, bool>
fn with_strings<WITH_STRINGS_O>( &mut self, ctx: &mut Context<'_>, exclude_prefix_ws: bool, f: &mut impl FnMut(&mut AstStr, &mut Context<'_>) -> ControlFlow<WITH_STRINGS_O>, ) -> ControlFlow<WITH_STRINGS_O, bool>
Iterates over all strings in this type. Read more
Source§fn format_output(&mut self, ctx: &mut Context<'_>) -> FormatOutput
fn format_output(&mut self, ctx: &mut Context<'_>) -> FormatOutput
Returns the formatting output for this type, without formatting it.
Source§fn prefix_ws_is_pure(&mut self, ctx: &mut Context<'_>) -> Option<bool>
fn prefix_ws_is_pure(&mut self, ctx: &mut Context<'_>) -> Option<bool>
Returns if the prefix whitespace is pure.
Source§fn prefix_ws_join_prefix(
&mut self,
ctx: &mut Context<'_>,
ws: Whitespace,
) -> Result<(), Whitespace>
fn prefix_ws_join_prefix( &mut self, ctx: &mut Context<'_>, ws: Whitespace, ) -> Result<(), Whitespace>
Joins a string as a prefix onto the prefix whitespace of this type.
Source§impl From<ArithmeticOrLogicalExpression> for OperatorExpression
impl From<ArithmeticOrLogicalExpression> for OperatorExpression
Source§fn from(value: ArithmeticOrLogicalExpression) -> Self
fn from(value: ArithmeticOrLogicalExpression) -> Self
Converts to this type from the input type.
Source§impl From<AssignmentExpression> for OperatorExpression
impl From<AssignmentExpression> for OperatorExpression
Source§fn from(value: AssignmentExpression) -> Self
fn from(value: AssignmentExpression) -> Self
Converts to this type from the input type.
Source§impl From<BorrowExpression> for OperatorExpression
impl From<BorrowExpression> for OperatorExpression
Source§fn from(value: BorrowExpression) -> Self
fn from(value: BorrowExpression) -> Self
Converts to this type from the input type.
Source§impl From<ComparisonExpression> for OperatorExpression
impl From<ComparisonExpression> for OperatorExpression
Source§fn from(value: ComparisonExpression) -> Self
fn from(value: ComparisonExpression) -> Self
Converts to this type from the input type.
Source§impl From<CompoundAssignmentExpression> for OperatorExpression
impl From<CompoundAssignmentExpression> for OperatorExpression
Source§fn from(value: CompoundAssignmentExpression) -> Self
fn from(value: CompoundAssignmentExpression) -> Self
Converts to this type from the input type.
Source§impl From<DereferenceExpression> for OperatorExpression
impl From<DereferenceExpression> for OperatorExpression
Source§fn from(value: DereferenceExpression) -> Self
fn from(value: DereferenceExpression) -> Self
Converts to this type from the input type.
Source§impl From<LazyBooleanExpression> for OperatorExpression
impl From<LazyBooleanExpression> for OperatorExpression
Source§fn from(value: LazyBooleanExpression) -> Self
fn from(value: LazyBooleanExpression) -> Self
Converts to this type from the input type.
Source§impl From<NegationExpression> for OperatorExpression
impl From<NegationExpression> for OperatorExpression
Source§fn from(value: NegationExpression) -> Self
fn from(value: NegationExpression) -> Self
Converts to this type from the input type.
Source§impl From<OperatorExpression> for ExpressionWithoutBlockInner
impl From<OperatorExpression> for ExpressionWithoutBlockInner
Source§fn from(value: OperatorExpression) -> Self
fn from(value: OperatorExpression) -> Self
Converts to this type from the input type.
Source§impl From<TryPropagationExpression> for OperatorExpression
impl From<TryPropagationExpression> for OperatorExpression
Source§fn from(value: TryPropagationExpression) -> Self
fn from(value: TryPropagationExpression) -> Self
Converts to this type from the input type.
Source§impl From<TypeCastExpression> for OperatorExpression
impl From<TypeCastExpression> for OperatorExpression
Source§fn from(value: TypeCastExpression) -> Self
fn from(value: TypeCastExpression) -> Self
Converts to this type from the input type.
Source§impl IntoRecursiveRoot<ExpressionInner> for OperatorExpression
impl IntoRecursiveRoot<ExpressionInner> for OperatorExpression
fn into_recursive_root(self, parser: &mut Parser) -> ExpressionInner
Source§impl ParsableRecursive<ExpressionInner> for OperatorExpression
impl ParsableRecursive<ExpressionInner> for OperatorExpression
Source§type Suffix = OperatorExpressionSuffix
type Suffix = OperatorExpressionSuffix
The suffix for this type
Source§type Prefix = OperatorExpressionPrefix
type Prefix = OperatorExpressionPrefix
The prefix for this type
Source§type Infix = OperatorExpressionInfix
type Infix = OperatorExpressionInfix
The infix of this type
Source§type Base = OperatorExpressionBase
type Base = OperatorExpressionBase
Base type
Source§fn join_suffix(
root: ExpressionInner,
suffix: Self::Suffix,
parser: &mut Parser,
) -> Self
fn join_suffix( root: ExpressionInner, suffix: Self::Suffix, parser: &mut Parser, ) -> Self
Creates this type from it’s parts
Source§fn join_prefix(
prefix: Self::Prefix,
root: ExpressionInner,
parser: &mut Parser,
) -> Self
fn join_prefix( prefix: Self::Prefix, root: ExpressionInner, parser: &mut Parser, ) -> Self
Creates this type from it’s parts
Source§fn join_infix(
lhs: ExpressionInner,
infix: Self::Infix,
rhs: ExpressionInner,
parser: &mut Parser,
) -> Self
fn join_infix( lhs: ExpressionInner, infix: Self::Infix, rhs: ExpressionInner, parser: &mut Parser, ) -> Self
Creates this type from it’s parts
Source§impl PartialEq for OperatorExpression
impl PartialEq for OperatorExpression
Source§impl Print for OperatorExpression
impl Print for OperatorExpression
Source§fn print_non_ws(&self, f: &mut PrintFmt)
fn print_non_ws(&self, f: &mut PrintFmt)
Prints this type onto a writer excluding whitespace Read more
Source§impl Serialize for OperatorExpression
impl Serialize for OperatorExpression
Source§impl TryFrom<ExpressionWithoutBlockInner> for OperatorExpression
impl TryFrom<ExpressionWithoutBlockInner> for OperatorExpression
Source§type Error = TryIntoError<ExpressionWithoutBlockInner>
type Error = TryIntoError<ExpressionWithoutBlockInner>
The type returned in the event of a conversion error.
Source§fn try_from(
value: ExpressionWithoutBlockInner,
) -> Result<Self, TryIntoError<ExpressionWithoutBlockInner>>
fn try_from( value: ExpressionWithoutBlockInner, ) -> Result<Self, TryIntoError<ExpressionWithoutBlockInner>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for ArithmeticOrLogicalExpression
impl TryFrom<OperatorExpression> for ArithmeticOrLogicalExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for AssignmentExpression
impl TryFrom<OperatorExpression> for AssignmentExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for BorrowExpression
impl TryFrom<OperatorExpression> for BorrowExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for ComparisonExpression
impl TryFrom<OperatorExpression> for ComparisonExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for CompoundAssignmentExpression
impl TryFrom<OperatorExpression> for CompoundAssignmentExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for DereferenceExpression
impl TryFrom<OperatorExpression> for DereferenceExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for LazyBooleanExpression
impl TryFrom<OperatorExpression> for LazyBooleanExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for NegationExpression
impl TryFrom<OperatorExpression> for NegationExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for TryPropagationExpression
impl TryFrom<OperatorExpression> for TryPropagationExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFrom<OperatorExpression> for TypeCastExpression
impl TryFrom<OperatorExpression> for TypeCastExpression
Source§type Error = TryIntoError<OperatorExpression>
type Error = TryIntoError<OperatorExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: OperatorExpression,
) -> Result<Self, TryIntoError<OperatorExpression>>
fn try_from( value: OperatorExpression, ) -> Result<Self, TryIntoError<OperatorExpression>>
Performs the conversion.
Source§impl TryFromRecursiveRoot<ExpressionInner> for OperatorExpression
impl TryFromRecursiveRoot<ExpressionInner> for OperatorExpression
fn try_from_recursive_root( root: ExpressionInner, parser: &mut Parser, ) -> Option<Self>
impl Eq for OperatorExpression
impl StructuralPartialEq for OperatorExpression
Auto Trait Implementations§
impl Freeze for OperatorExpression
impl RefUnwindSafe for OperatorExpression
impl !Send for OperatorExpression
impl !Sync for OperatorExpression
impl Unpin for OperatorExpression
impl UnsafeUnpin for OperatorExpression
impl UnwindSafe for OperatorExpression
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<R, T> FromRecursiveRoot<R> for Twhere
T: From<R>,
impl<R, T> FromRecursiveRoot<R> for Twhere
T: From<R>,
fn from_recursive_root(root: R, _parser: &mut Parser) -> T
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