Skip to main content

DefaultTypes

Struct DefaultTypes 

Source
pub struct DefaultTypes;
Expand description

The types emitted by the parser

Trait Implementations§

Source§

impl AstTypes for DefaultTypes

Source§

type Annotation = Span

An annotation on an arbitrary Expr or Pat
Source§

type Literal = Literal

A literal value
Source§

type MacroId = Interned<'static, str>

A (possibly interned) symbol or index which implements AsRef<str>
Source§

type Symbol = Interned<'static, str>

A (possibly interned) symbol or index
Source§

type Path = Path

A (possibly compound) symbol or index
Source§

impl Clone for DefaultTypes

Source§

fn clone(&self) -> DefaultTypes

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DefaultTypes

Source§

impl Debug for DefaultTypes

Source§

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

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

impl Display for DefaultTypes

Source§

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

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

impl Eq for DefaultTypes

Source§

impl Fold<DefaultTypes> for Bubbler

Source§

type Error = Infallible

Source§

fn fold_annotation( &mut self, anno: <DefaultTypes as AstTypes>::Annotation, ) -> Result<<DefaultTypes as AstTypes>::Annotation, Self::Error>

Consumes an Annotation in A, possibly transforms it, and produces a replacement Annotation in B
Source§

fn fold_macro_id( &mut self, name: <DefaultTypes as AstTypes>::MacroId, ) -> Result<<DefaultTypes as AstTypes>::MacroId, Self::Error>

Consumes a MacroId in A, possibly transforms it, and produces a replacement MacroId in B
Source§

fn fold_symbol( &mut self, name: <DefaultTypes as AstTypes>::Symbol, ) -> Result<<DefaultTypes as AstTypes>::Symbol, Self::Error>

Consumes a Symbol in A, possibly transforms it, and produces a replacement Symbol in B
Source§

fn fold_path( &mut self, path: <DefaultTypes as AstTypes>::Path, ) -> Result<<DefaultTypes as AstTypes>::Path, Self::Error>

Consumes a Path in A, possibly transforms it, and produces a replacement Path in B
Source§

fn fold_literal( &mut self, lit: <DefaultTypes as AstTypes>::Literal, ) -> Result<<DefaultTypes as AstTypes>::Literal, Self::Error>

Consumes a Literal in A, possibly transforms it, and produces a replacement Literal in B
Source§

fn fold_at_pat( &mut self, pat: At<Pat<DefaultTypes>, DefaultTypes>, ) -> Result<At<Pat<DefaultTypes>, DefaultTypes>, Self::Error>

Folds an annotated pattern, so the pattern and annotation can be seen at once.
Source§

fn fold_bind( &mut self, bind: Bind<DefaultTypes>, ) -> Result<Bind<DefaultTypes>, Self::Error>

Consumes a Bind, possibly transforms it, and produces a replacement Bind
Source§

fn fold_at_expr( &mut self, expr: At<Expr<From>, From>, ) -> Result<At<Expr<To>, To>, Self::Error>

Folds an annotated expression, so the expression and annotation can be seen at once.
Source§

fn fold_expr(&mut self, expr: Expr<From>) -> Result<Expr<To>, Self::Error>

Consumes an Expr, possibly transforms it, and produces a replacement Expr
Source§

fn fold_use(&mut self, item: Use<From>) -> Result<Use<To>, Self::Error>

Consumes a Use, possibly transforms it, and produces a replacement Use
Source§

fn fold_pat(&mut self, pat: Pat<From>) -> Result<Pat<To>, Self::Error>

Consumes a Pat, possibly transforms it, and produces a replacement Pat
Source§

fn fold_make(&mut self, make: Make<From>) -> Result<Make<To>, Self::Error>

Consumes a Make, possibly transforms it, and produces a replacement Make
Source§

fn fold_makearm( &mut self, arm: MakeArm<From>, ) -> Result<MakeArm<To>, Self::Error>

Consumes a MakeArm, possibly transforms it, and produces a replacement MakeArm
Source§

fn fold_match(&mut self, mtch: Match<From>) -> Result<Match<To>, Self::Error>

Consumes a Make, possibly transforms it, and produces a replacement Make
Source§

fn fold_matcharm( &mut self, arm: MatchArm<From>, ) -> Result<MatchArm<To>, Self::Error>

Consumes a MakeArm, possibly transforms it, and produces a replacement MakeArm
Source§

impl Hash for DefaultTypes

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DefaultTypes

Source§

fn eq(&self, other: &DefaultTypes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DefaultTypes

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AstNode for T
where T: Clone + Debug + Display + PartialEq + Eq + Hash,

Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.