Struct marker_api::ast::TupleExpr

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

An expression used to construct a tuple.

//          vvvvvvvvvvvv A tuple expression with four elements
let slice = (1, 2, 3, 4);

Implementations§

source§

impl<'ast> TupleExpr<'ast>

source

pub fn elements(&self) -> &[ExprKind<'ast>]

Trait Implementations§

source§

impl<'ast> Debug for TupleExpr<'ast>

source§

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

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

impl<'ast> ExprData<'ast> for TupleExpr<'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 TupleExpr<'ast>> for ExprKind<'ast>

source§

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

Converts to this type from the input type.
source§

impl<'ast> HasNodeId for TupleExpr<'ast>

source§

fn node_id(&self) -> NodeId

Returns the NodeId of the identifiable node
source§

impl<'ast> HasSpan<'ast> for TupleExpr<'ast>

source§

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

This returns the Span of the implementing AST node.

Auto Trait Implementations§

§

impl<'ast> RefUnwindSafe for TupleExpr<'ast>

§

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

§

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

§

impl<'ast> Unpin for TupleExpr<'ast>

§

impl<'ast> UnwindSafe for TupleExpr<'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,