pub trait AstDeref {
    type Target;

    // Required methods
    fn ast_deref(&self) -> &Self::Target;
    fn ast_deref_mut(&mut self) -> &mut Self::Target;
}
Expand description

A utility trait to reduce boilerplate. Standard Deref(Mut) cannot be reused due to coherence.

Required Associated Types§

Required Methods§

source

fn ast_deref(&self) -> &Self::Target

source

fn ast_deref_mut(&mut self) -> &mut Self::Target

Implementors§

source§

impl !AstDeref for Expr

source§

impl !AstDeref for Item

source§

impl !AstDeref for Stmt

source§

impl !AstDeref for AssocItem

source§

impl !AstDeref for ForeignItem

source§

impl<T> AstDeref for P<T>

§

type Target = T

source§

impl<Wrapped, Tag> AstDeref for AstNodeWrapper<Wrapped, Tag>

§

type Target = Wrapped