pub struct LetBinding<'ast> {
pub pattern: Pattern<'ast>,
pub metadata: LetMetadata<'ast>,
pub value: Ast<'ast>,
}Expand description
An individual binding in a let block.
Fields§
§pattern: Pattern<'ast>§metadata: LetMetadata<'ast>§value: Ast<'ast>Trait Implementations§
Source§impl<'ast> Clone for LetBinding<'ast>
impl<'ast> Clone for LetBinding<'ast>
Source§fn clone(&self) -> LetBinding<'ast>
fn clone(&self) -> LetBinding<'ast>
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 CloneTo for LetBinding<'_>
impl CloneTo for LetBinding<'_>
Source§type Data<'ast> = LetBinding<'ast>
type Data<'ast> = LetBinding<'ast>
This is always
Self, be we need associated types to make Rust understand that Self is
always parametric over the 'ast lifetime. We’re using GATs to emulate higher-kinded
types.Source§impl<'ast> Debug for LetBinding<'ast>
impl<'ast> Debug for LetBinding<'ast>
Source§impl<'ast> PartialEq for LetBinding<'ast>
impl<'ast> PartialEq for LetBinding<'ast>
Source§impl<'a> Pretty<'a, Allocator> for &LetBinding<'_>
impl<'a> Pretty<'a, Allocator> for &LetBinding<'_>
Source§impl<'ast> TraverseAlloc<'ast, Ast<'ast>> for LetBinding<'ast>
impl<'ast> TraverseAlloc<'ast, Ast<'ast>> for LetBinding<'ast>
Source§fn traverse<F, E>(
self,
alloc: &'ast AstAlloc,
f: &mut F,
order: TraverseOrder,
) -> Result<Self, E>
fn traverse<F, E>( self, alloc: &'ast AstAlloc, f: &mut F, order: TraverseOrder, ) -> Result<Self, E>
Same as Traverse::traverse, but takes an additional AST allocator.
Source§fn traverse_ref<S, U>(
&'ast self,
f: &mut dyn FnMut(&'ast Ast<'ast>, &S) -> TraverseControl<S, U>,
scope: &S,
) -> Option<U>
fn traverse_ref<S, U>( &'ast self, f: &mut dyn FnMut(&'ast Ast<'ast>, &S) -> TraverseControl<S, U>, scope: &S, ) -> Option<U>
Same as Traverse::traverse_ref, but takes an additional AST allocator. Read more
fn find_map<S>(&'ast self, pred: impl FnMut(&'ast T) -> Option<S>) -> Option<S>where
T: Clone + 'ast,
impl Allocable for LetBinding<'_>
impl<'ast> Eq for LetBinding<'ast>
impl<'ast> StructuralPartialEq for LetBinding<'ast>
Auto Trait Implementations§
impl<'ast> Freeze for LetBinding<'ast>
impl<'ast> RefUnwindSafe for LetBinding<'ast>
impl<'ast> Send for LetBinding<'ast>
impl<'ast> Sync for LetBinding<'ast>
impl<'ast> Unpin for LetBinding<'ast>
impl<'ast> UnsafeUnpin for LetBinding<'ast>
impl<'ast> UnwindSafe for LetBinding<'ast>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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