struct Printer<'a> {
db: &'a dyn SourceDatabase,
tree: &'a ItemTree,
buf: String,
indent_level: usize,
needs_indent: bool,
edition: Edition,
}Fields§
§db: &'a dyn SourceDatabase§tree: &'a ItemTree§buf: String§indent_level: usize§needs_indent: bool§edition: EditionImplementations§
Source§impl Printer<'_>
impl Printer<'_>
fn indented(&mut self, f: impl FnOnce(&mut Self))
fn print_attrs(&mut self, attrs: &AttrsOrCfg, inner: bool, separated_by: &str)
fn print_attrs_of(&mut self, of: ModItemId, separated_by: &str)
fn print_visibility(&mut self, vis: RawVisibilityId)
fn print_use_tree(&mut self, use_tree: &UseTree)
fn print_mod_item(&mut self, item: ModItemId)
fn print_ast_id(&mut self, ast_id: ErasedFileAstId)
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Printer<'a>
impl<'a> !Send for Printer<'a>
impl<'a> !Sync for Printer<'a>
impl<'a> !UnwindSafe for Printer<'a>
impl<'a> Freeze for Printer<'a>
impl<'a> Unpin for Printer<'a>
impl<'a> UnsafeUnpin for Printer<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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