Trait rustfmt_nightly::rewrite::Rewrite

source ·
pub(crate) trait Rewrite {
    // Required method
    fn rewrite(
        &self,
        context: &RewriteContext<'_>,
        shape: Shape
    ) -> Option<String>;
}

Required Methods§

source

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

Rewrite self into shape.

Implementations on Foreign Types§

source§

impl Rewrite for AssocConstraintKind

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for FnRetTy

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for GenericArg

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for GenericBound

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for NestedMetaItem

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for WherePredicate

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for AnonConst

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for AssocConstraint

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Attribute

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Block

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Expr

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for FieldDef

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for GenericParam

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Item

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Lifetime

source§

fn rewrite(&self, context: &RewriteContext<'_>, _: Shape) -> Option<String>

source§

impl Rewrite for Local

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for MetaItem

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Param

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Pat

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for PatField

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for PolyTraitRef

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for TraitRef

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for Ty

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for ForeignItem

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for GenericBounds

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl Rewrite for [Attribute]

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

source§

impl<T: Rewrite> Rewrite for P<T>

source§

fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>

Implementors§