struct Printer<'a> {
db: &'a dyn SourceDatabase,
store: &'a ExpressionStore,
buf: String,
indent_level: usize,
line_format: LineFormat,
edition: Edition,
}Fields§
§db: &'a dyn SourceDatabase§store: &'a ExpressionStore§buf: String§indent_level: usize§line_format: LineFormat§edition: EditionImplementations§
Source§impl Printer<'_>
impl Printer<'_>
fn indented(&mut self, f: impl FnOnce(&mut Self))
fn whitespace(&mut self)
fn newline(&mut self)
fn print_expr(&mut self, expr: ExprId)
fn print_expr_in(&mut self, prec: Option<ExprPrecedence>, expr: ExprId)
fn print_block( &mut self, label: Option<&str>, unsafe_: Unsafe, statements: &[Statement], tail: &Option<Idx<Expr>>, )
fn print_pat(&mut self, pat: PatId)
fn print_stmt(&mut self, stmt: &Statement)
fn print_literal(&mut self, literal: &Literal)
fn print_binding(&mut self, id: BindingId)
fn print_path(&mut self, path: &Path)
pub(crate) fn print_generic_args(&mut self, generics: &GenericArgs)
pub(crate) fn print_generic_arg(&mut self, arg: &GenericArg)
pub(crate) fn print_type_param(&mut self, param: TypeParamId)
pub(crate) fn print_lifetime_param(&mut self, param: LifetimeParamId)
pub(crate) fn print_lifetime_ref(&mut self, lt_ref: LifetimeRefId)
pub(crate) fn print_type_ref(&mut self, type_ref: TypeRefId)
pub(crate) fn print_type_bounds(&mut self, bounds: &[TypeBound])
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