pub enum RangeExpression {
Inclusive(RangeInclusiveExpr),
ToInclusive(RangeToInclusiveExpr),
Both(RangeExpr),
From(RangeFromExpr),
To(RangeToExpr),
Full(RangeFullExpr),
}Expand description
RangeExpression
Variants§
Inclusive(RangeInclusiveExpr)
ToInclusive(RangeToInclusiveExpr)
Both(RangeExpr)
From(RangeFromExpr)
To(RangeToExpr)
Full(RangeFullExpr)
Trait Implementations§
Source§impl Clone for RangeExpression
impl Clone for RangeExpression
Source§fn clone(&self) -> RangeExpression
fn clone(&self) -> RangeExpression
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 RangeExpression
impl Debug for RangeExpression
Source§impl<'de> Deserialize<'de> for RangeExpression
impl<'de> Deserialize<'de> for RangeExpression
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 RangeExpression
impl Format<WhitespaceConfig, ()> for RangeExpression
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 RangeExpression
impl Formattable for RangeExpression
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<RangeExpr> for RangeExpression
impl From<RangeExpr> for RangeExpression
Source§impl From<RangeExpression> for ExpressionWithoutBlockInner
impl From<RangeExpression> for ExpressionWithoutBlockInner
Source§fn from(value: RangeExpression) -> Self
fn from(value: RangeExpression) -> Self
Converts to this type from the input type.
Source§impl From<RangeFromExpr> for RangeExpression
impl From<RangeFromExpr> for RangeExpression
Source§fn from(value: RangeFromExpr) -> Self
fn from(value: RangeFromExpr) -> Self
Converts to this type from the input type.
Source§impl From<RangeFullExpr> for RangeExpression
impl From<RangeFullExpr> for RangeExpression
Source§fn from(value: RangeFullExpr) -> Self
fn from(value: RangeFullExpr) -> Self
Converts to this type from the input type.
Source§impl From<RangeInclusiveExpr> for RangeExpression
impl From<RangeInclusiveExpr> for RangeExpression
Source§fn from(value: RangeInclusiveExpr) -> Self
fn from(value: RangeInclusiveExpr) -> Self
Converts to this type from the input type.
Source§impl From<RangeToExpr> for RangeExpression
impl From<RangeToExpr> for RangeExpression
Source§fn from(value: RangeToExpr) -> Self
fn from(value: RangeToExpr) -> Self
Converts to this type from the input type.
Source§impl From<RangeToInclusiveExpr> for RangeExpression
impl From<RangeToInclusiveExpr> for RangeExpression
Source§fn from(value: RangeToInclusiveExpr) -> Self
fn from(value: RangeToInclusiveExpr) -> Self
Converts to this type from the input type.
Source§impl IntoRecursiveRoot<ExpressionInner> for RangeExpression
impl IntoRecursiveRoot<ExpressionInner> for RangeExpression
fn into_recursive_root(self, parser: &mut Parser) -> ExpressionInner
Source§impl ParsableRecursive<ExpressionInner> for RangeExpression
impl ParsableRecursive<ExpressionInner> for RangeExpression
Source§type Suffix = RangeExpressionSuffix
type Suffix = RangeExpressionSuffix
The suffix for this type
Source§type Prefix = RangeExpressionPrefix
type Prefix = RangeExpressionPrefix
The prefix for this type
Source§type Infix = RangeExpressionInfix
type Infix = RangeExpressionInfix
The infix of this type
Source§type Base = RangeExpressionBase
type Base = RangeExpressionBase
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 RangeExpression
impl PartialEq for RangeExpression
Source§impl Print for RangeExpression
impl Print for RangeExpression
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 RangeExpression
impl Serialize for RangeExpression
Source§impl TryFrom<ExpressionWithoutBlockInner> for RangeExpression
impl TryFrom<ExpressionWithoutBlockInner> for RangeExpression
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<RangeExpression> for RangeExpr
impl TryFrom<RangeExpression> for RangeExpr
Source§type Error = TryIntoError<RangeExpression>
type Error = TryIntoError<RangeExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: RangeExpression,
) -> Result<Self, TryIntoError<RangeExpression>>
fn try_from( value: RangeExpression, ) -> Result<Self, TryIntoError<RangeExpression>>
Performs the conversion.
Source§impl TryFrom<RangeExpression> for RangeFromExpr
impl TryFrom<RangeExpression> for RangeFromExpr
Source§type Error = TryIntoError<RangeExpression>
type Error = TryIntoError<RangeExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: RangeExpression,
) -> Result<Self, TryIntoError<RangeExpression>>
fn try_from( value: RangeExpression, ) -> Result<Self, TryIntoError<RangeExpression>>
Performs the conversion.
Source§impl TryFrom<RangeExpression> for RangeFullExpr
impl TryFrom<RangeExpression> for RangeFullExpr
Source§type Error = TryIntoError<RangeExpression>
type Error = TryIntoError<RangeExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: RangeExpression,
) -> Result<Self, TryIntoError<RangeExpression>>
fn try_from( value: RangeExpression, ) -> Result<Self, TryIntoError<RangeExpression>>
Performs the conversion.
Source§impl TryFrom<RangeExpression> for RangeInclusiveExpr
impl TryFrom<RangeExpression> for RangeInclusiveExpr
Source§type Error = TryIntoError<RangeExpression>
type Error = TryIntoError<RangeExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: RangeExpression,
) -> Result<Self, TryIntoError<RangeExpression>>
fn try_from( value: RangeExpression, ) -> Result<Self, TryIntoError<RangeExpression>>
Performs the conversion.
Source§impl TryFrom<RangeExpression> for RangeToExpr
impl TryFrom<RangeExpression> for RangeToExpr
Source§type Error = TryIntoError<RangeExpression>
type Error = TryIntoError<RangeExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: RangeExpression,
) -> Result<Self, TryIntoError<RangeExpression>>
fn try_from( value: RangeExpression, ) -> Result<Self, TryIntoError<RangeExpression>>
Performs the conversion.
Source§impl TryFrom<RangeExpression> for RangeToInclusiveExpr
impl TryFrom<RangeExpression> for RangeToInclusiveExpr
Source§type Error = TryIntoError<RangeExpression>
type Error = TryIntoError<RangeExpression>
The type returned in the event of a conversion error.
Source§fn try_from(
value: RangeExpression,
) -> Result<Self, TryIntoError<RangeExpression>>
fn try_from( value: RangeExpression, ) -> Result<Self, TryIntoError<RangeExpression>>
Performs the conversion.
Source§impl TryFromRecursiveRoot<ExpressionInner> for RangeExpression
impl TryFromRecursiveRoot<ExpressionInner> for RangeExpression
fn try_from_recursive_root( root: ExpressionInner, parser: &mut Parser, ) -> Option<Self>
impl Eq for RangeExpression
impl StructuralPartialEq for RangeExpression
Auto Trait Implementations§
impl Freeze for RangeExpression
impl RefUnwindSafe for RangeExpression
impl !Send for RangeExpression
impl !Sync for RangeExpression
impl Unpin for RangeExpression
impl UnsafeUnpin for RangeExpression
impl UnwindSafe for RangeExpression
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