[−][src]Struct rustc_ap_rustc_ast_pretty::pprust::State
Fields
s: Printer
Implementations
impl<'a> State<'a>
[src]
pub fn synth_comment(&mut self, text: String)
[src]
pub fn print_mod(&mut self, _mod: &Mod, attrs: &[Attribute])
[src]
pub fn print_opt_lifetime(&mut self, lifetime: &Option<Lifetime>)
[src]
pub fn print_assoc_constraint(&mut self, constraint: &AssocTyConstraint)
[src]
pub fn print_generic_arg(&mut self, generic_arg: &GenericArg)
[src]
pub fn print_type(&mut self, ty: &Ty)
[src]
pub fn print_expr(&mut self, expr: &Expr)
[src]
pub fn print_usize(&mut self, i: usize)
[src]
pub fn print_type_bounds(
&mut self,
prefix: &'static str,
bounds: &[GenericBound]
)
[src]
&mut self,
prefix: &'static str,
bounds: &[GenericBound]
)
pub fn print_mutability(&mut self, mutbl: Mutability, print_const: bool)
[src]
Methods from Deref<Target = Printer>
pub fn word_space<W: Into<Cow<'static, str>>>(&mut self, w: W)
[src]
pub fn popen(&mut self)
[src]
pub fn pclose(&mut self)
[src]
pub fn hardbreak_if_not_bol(&mut self)
[src]
pub fn space_if_not_bol(&mut self)
[src]
pub fn nbsp(&mut self)
[src]
pub fn word_nbsp<S: Into<Cow<'static, str>>>(&mut self, w: S)
[src]
pub fn last_token(&self) -> Token
[src]
pub fn replace_last_token(&mut self, t: Token)
[src]
Be very careful with this!
pub fn rbox(&mut self, indent: usize, b: Breaks)
[src]
"raw box"
pub fn ibox(&mut self, indent: usize)
[src]
Inconsistent breaking box
pub fn cbox(&mut self, indent: usize)
[src]
Consistent breaking box
pub fn break_offset(&mut self, n: usize, off: isize)
[src]
pub fn end(&mut self)
[src]
pub fn word<S: Into<Cow<'static, str>>>(&mut self, wrd: S)
[src]
pub fn space(&mut self)
[src]
pub fn hardbreak(&mut self)
[src]
pub fn is_beginning_of_line(&self) -> bool
[src]
Trait Implementations
impl<'_> Deref for State<'_>
[src]
impl<'_> DerefMut for State<'_>
[src]
impl<'a> PrintState<'a> for State<'a>
[src]
fn comments(&mut self) -> &mut Option<Comments<'a>>
[src]
fn print_ident(&mut self, ident: Ident)
[src]
fn print_generic_args(&mut self, args: &GenericArgs, colons_before_params: bool)
[src]
fn strsep<T, F>(
&mut self,
sep: &'static str,
space_before: bool,
b: Breaks,
elts: &[T],
op: F
) where
F: FnMut(&mut Self, &T),
[src]
&mut self,
sep: &'static str,
space_before: bool,
b: Breaks,
elts: &[T],
op: F
) where
F: FnMut(&mut Self, &T),
fn commasep<T, F>(&mut self, b: Breaks, elts: &[T], op: F) where
F: FnMut(&mut Self, &T),
[src]
F: FnMut(&mut Self, &T),
fn maybe_print_comment(&mut self, pos: BytePos)
[src]
fn print_comment(&mut self, cmnt: &Comment)
[src]
fn next_comment(&mut self) -> Option<Comment>
[src]
fn print_literal(&mut self, lit: &Lit)
[src]
fn print_string(&mut self, st: &str, style: StrStyle)
[src]
fn print_symbol(&mut self, sym: Symbol, style: StrStyle)
[src]
fn print_inner_attributes(&mut self, attrs: &[Attribute])
[src]
fn print_inner_attributes_no_trailing_hardbreak(&mut self, attrs: &[Attribute])
[src]
fn print_outer_attributes(&mut self, attrs: &[Attribute])
[src]
fn print_inner_attributes_inline(&mut self, attrs: &[Attribute])
[src]
fn print_outer_attributes_inline(&mut self, attrs: &[Attribute])
[src]
fn print_either_attributes(
&mut self,
attrs: &[Attribute],
kind: AttrStyle,
is_inline: bool,
trailing_hardbreak: bool
)
[src]
&mut self,
attrs: &[Attribute],
kind: AttrStyle,
is_inline: bool,
trailing_hardbreak: bool
)
fn print_attribute(&mut self, attr: &Attribute)
[src]
fn print_attribute_inline(&mut self, attr: &Attribute, is_inline: bool)
[src]
fn print_attr_item(&mut self, item: &AttrItem, span: Span)
[src]
fn print_meta_list_item(&mut self, item: &NestedMetaItem)
[src]
fn print_meta_item(&mut self, item: &MetaItem)
[src]
fn print_tt(&mut self, tt: &TokenTree, convert_dollar_crate: bool)
[src]
fn print_tts(&mut self, tts: &TokenStream, convert_dollar_crate: bool)
[src]
fn print_mac_common(
&mut self,
header: Option<MacHeader<'_>>,
has_bang: bool,
ident: Option<Ident>,
delim: DelimToken,
tts: &TokenStream,
convert_dollar_crate: bool,
span: Span
)
[src]
&mut self,
header: Option<MacHeader<'_>>,
has_bang: bool,
ident: Option<Ident>,
delim: DelimToken,
tts: &TokenStream,
convert_dollar_crate: bool,
span: Span
)
fn print_path(&mut self, path: &Path, colons_before_params: bool, depth: usize)
[src]
fn print_path_segment(
&mut self,
segment: &PathSegment,
colons_before_params: bool
)
[src]
&mut self,
segment: &PathSegment,
colons_before_params: bool
)
fn head<S: Into<Cow<'static, str>>>(&mut self, w: S)
[src]
fn bopen(&mut self)
[src]
fn bclose_maybe_open(&mut self, span: Span, close_box: bool)
[src]
fn bclose(&mut self, span: Span)
[src]
fn break_offset_if_not_bol(&mut self, n: usize, off: isize)
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for State<'a>
impl<'a> !Send for State<'a>
impl<'a> !Sync for State<'a>
impl<'a> Unpin for State<'a>
impl<'a> !UnwindSafe for State<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MaybeResult<T> for T
[src]
type Error = !
fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T
[src]
fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,