pub trait ParenthesizedNode<'a> {
    // Required methods
    fn lpar(&self) -> &Vec<LeftParen<'a>>;
    fn rpar(&self) -> &Vec<RightParen<'a>>;
    fn with_parens(self, left: LeftParen<'a>, right: RightParen<'a>) -> Self;

    // Provided method
    fn parenthesize<F>(&self, state: &mut CodegenState<'a>, f: F)
       where F: FnOnce(&mut CodegenState<'a>) { ... }
}

Required Methods§

source

fn lpar(&self) -> &Vec<LeftParen<'a>>

source

fn rpar(&self) -> &Vec<RightParen<'a>>

source

fn with_parens(self, left: LeftParen<'a>, right: RightParen<'a>) -> Self

Provided Methods§

source

fn parenthesize<F>(&self, state: &mut CodegenState<'a>, f: F)
where F: FnOnce(&mut CodegenState<'a>),

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: ParenthesizedNode<'a>> ParenthesizedNode<'a> for Box<T>

source§

fn lpar(&self) -> &Vec<LeftParen<'a>>

source§

fn rpar(&self) -> &Vec<RightParen<'a>>

source§

fn parenthesize<F>(&self, state: &mut CodegenState<'a>, f: F)
where F: FnOnce(&mut CodegenState<'a>),

source§

fn with_parens(self, left: LeftParen<'a>, right: RightParen<'a>) -> Self

Implementors§

source§

impl<'a> ParenthesizedNode<'a> for AssignTargetExpression<'a>

source§

impl<'a> ParenthesizedNode<'a> for DelTargetExpression<'a>

source§

impl<'a> ParenthesizedNode<'a> for Expression<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchPattern<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchSequence<'a>

source§

impl<'a> ParenthesizedNode<'a> for Attribute<'a>

source§

impl<'a> ParenthesizedNode<'a> for Await<'a>

source§

impl<'a> ParenthesizedNode<'a> for BinaryOperation<'a>

source§

impl<'a> ParenthesizedNode<'a> for BooleanOperation<'a>

source§

impl<'a> ParenthesizedNode<'a> for Call<'a>

source§

impl<'a> ParenthesizedNode<'a> for Comparison<'a>

source§

impl<'a> ParenthesizedNode<'a> for ConcatenatedString<'a>

source§

impl<'a> ParenthesizedNode<'a> for Dict<'a>

source§

impl<'a> ParenthesizedNode<'a> for DictComp<'a>

source§

impl<'a> ParenthesizedNode<'a> for Ellipsis<'a>

source§

impl<'a> ParenthesizedNode<'a> for Float<'a>

source§

impl<'a> ParenthesizedNode<'a> for FormattedString<'a>

source§

impl<'a> ParenthesizedNode<'a> for GeneratorExp<'a>

source§

impl<'a> ParenthesizedNode<'a> for IfExp<'a>

source§

impl<'a> ParenthesizedNode<'a> for Imaginary<'a>

source§

impl<'a> ParenthesizedNode<'a> for Integer<'a>

source§

impl<'a> ParenthesizedNode<'a> for Lambda<'a>

source§

impl<'a> ParenthesizedNode<'a> for List<'a>

source§

impl<'a> ParenthesizedNode<'a> for ListComp<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchAs<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchClass<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchList<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchMapping<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchOr<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchSingleton<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchTuple<'a>

source§

impl<'a> ParenthesizedNode<'a> for MatchValue<'a>

source§

impl<'a> ParenthesizedNode<'a> for Name<'a>

source§

impl<'a> ParenthesizedNode<'a> for NamedExpr<'a>

source§

impl<'a> ParenthesizedNode<'a> for Set<'a>

source§

impl<'a> ParenthesizedNode<'a> for SetComp<'a>

source§

impl<'a> ParenthesizedNode<'a> for SimpleString<'a>

source§

impl<'a> ParenthesizedNode<'a> for StarredElement<'a>

source§

impl<'a> ParenthesizedNode<'a> for Subscript<'a>

source§

impl<'a> ParenthesizedNode<'a> for Tuple<'a>

source§

impl<'a> ParenthesizedNode<'a> for UnaryOperation<'a>

source§

impl<'a> ParenthesizedNode<'a> for Yield<'a>