rustfmt_nightly::vertical

Trait AlignedItem

Source
pub(crate) trait AlignedItem {
    // Required methods
    fn skip(&self) -> bool;
    fn get_span(&self) -> Span;
    fn rewrite_prefix(
        &self,
        context: &RewriteContext<'_>,
        shape: Shape,
    ) -> Result<String, RewriteError>;
    fn rewrite_aligned_item(
        &self,
        context: &RewriteContext<'_>,
        shape: Shape,
        prefix_max_width: usize,
    ) -> Result<String, RewriteError>;
}

Required Methods§

Source

fn skip(&self) -> bool

Source

fn get_span(&self) -> Span

Source

fn rewrite_prefix( &self, context: &RewriteContext<'_>, shape: Shape, ) -> Result<String, RewriteError>

Source

fn rewrite_aligned_item( &self, context: &RewriteContext<'_>, shape: Shape, prefix_max_width: usize, ) -> Result<String, RewriteError>

Implementations on Foreign Types§

Source§

impl AlignedItem for ExprField

Source§

fn skip(&self) -> bool

Source§

fn get_span(&self) -> Span

Source§

fn rewrite_prefix( &self, context: &RewriteContext<'_>, shape: Shape, ) -> Result<String, RewriteError>

Source§

fn rewrite_aligned_item( &self, context: &RewriteContext<'_>, shape: Shape, prefix_max_width: usize, ) -> Result<String, RewriteError>

Source§

impl AlignedItem for FieldDef

Source§

fn skip(&self) -> bool

Source§

fn get_span(&self) -> Span

Source§

fn rewrite_prefix( &self, context: &RewriteContext<'_>, shape: Shape, ) -> Result<String, RewriteError>

Source§

fn rewrite_aligned_item( &self, context: &RewriteContext<'_>, shape: Shape, prefix_max_width: usize, ) -> Result<String, RewriteError>

Implementors§