Struct marker_api::ast::RangeExpr

source ·
#[repr(C)]
pub struct RangeExpr<'ast> { /* private fields */ }
Expand description

A range expression, like these:

1..9;
3..;
..5;
..;
0..=1;

Implementations§

source§

impl<'ast> RangeExpr<'ast>

source

pub fn start(&self) -> Option<ExprKind<'ast>>

source

pub fn end(&self) -> Option<ExprKind<'ast>>

source

pub fn is_inclusive(&self) -> bool

Trait Implementations§

source§

impl<'ast> Debug for RangeExpr<'ast>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ast> ExprData<'ast> for RangeExpr<'ast>

source§

fn id(&self) -> ExprId

Returns the ExprId of this expression.
source§

fn ty(&self) -> TyKind<'ast>

Returns the semantic type of this expression.
source§

fn precedence(&self) -> ExprPrecedence

Returns the ExprPrecedence of this expression.
source§

fn as_expr(&'ast self) -> ExprKind<'ast>

Returns this expression wrapped in it’s ExprKind variant. Read more
source§

impl<'ast> From<&'ast RangeExpr<'ast>> for ExprKind<'ast>

source§

fn from(from: &'ast RangeExpr<'ast>) -> Self

Converts to this type from the input type.
source§

impl<'ast> HasNodeId for RangeExpr<'ast>

source§

fn node_id(&self) -> NodeId

Returns the NodeId of the identifiable node
source§

impl<'ast> HasSpan<'ast> for RangeExpr<'ast>

source§

fn span(&self) -> &Span<'ast>

This returns the Span of the implementing AST node.

Auto Trait Implementations§

§

impl<'ast> RefUnwindSafe for RangeExpr<'ast>

§

impl<'ast> !Send for RangeExpr<'ast>

§

impl<'ast> !Sync for RangeExpr<'ast>

§

impl<'ast> Unpin for RangeExpr<'ast>

§

impl<'ast> UnwindSafe for RangeExpr<'ast>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<'ast, N> EmissionNode<'ast> for Nwhere N: Debug + HasSpan<'ast> + HasNodeId,