Trait syntex_syntax::print::pprust::PrintState [] [src]

pub trait PrintState<'a> {
    fn writer(&mut self) -> &mut Printer<'a>;
    fn boxes(&mut self) -> &mut Vec<Breaks>;
    fn comments(&mut self) -> &mut Option<Vec<Comment>>;
    fn cur_cmnt_and_lit(&mut self) -> &mut CurrentCommentAndLiteral;
    fn literals(&self) -> &Option<Vec<Literal>>;

    fn word_space(&mut self, w: &str) -> Result<()> { ... }
    fn popen(&mut self) -> Result<()> { ... }
    fn pclose(&mut self) -> Result<()> { ... }
    fn is_begin(&mut self) -> bool { ... }
    fn is_end(&mut self) -> bool { ... }
    fn is_bol(&mut self) -> bool { ... }
    fn hardbreak_if_not_bol(&mut self) -> Result<()> { ... }
    fn rbox(&mut self, u: usize, b: Breaks) -> Result<()> { ... }
    fn ibox(&mut self, u: usize) -> Result<()> { ... }
    fn end(&mut self) -> Result<()> { ... }
    fn commasep<T, F>(&mut self, b: Breaks, elts: &[T], op: F) -> Result<()> where F: FnMut(&mut Self, &T) -> Result<()> { ... }
    fn next_lit(&mut self, pos: BytePos) -> Option<Literal> { ... }
    fn maybe_print_comment(&mut self, pos: BytePos) -> Result<()> { ... }
    fn print_comment(&mut self, cmnt: &Comment) -> Result<()> { ... }
    fn next_comment(&mut self) -> Option<Comment> { ... }
    fn print_literal(&mut self, lit: &Lit) -> Result<()> { ... }
    fn print_string(&mut self, st: &str, style: StrStyle) -> Result<()> { ... }
    fn print_inner_attributes(&mut self, attrs: &[Attribute]) -> Result<()> { ... }
    fn print_inner_attributes_no_trailing_hardbreak(&mut self, attrs: &[Attribute]) -> Result<()> { ... }
    fn print_outer_attributes(&mut self, attrs: &[Attribute]) -> Result<()> { ... }
    fn print_inner_attributes_inline(&mut self, attrs: &[Attribute]) -> Result<()> { ... }
    fn print_outer_attributes_inline(&mut self, attrs: &[Attribute]) -> Result<()> { ... }
    fn print_either_attributes(&mut self, attrs: &[Attribute], kind: AttrStyle, is_inline: bool, trailing_hardbreak: bool) -> Result<()> { ... }
    fn print_attribute(&mut self, attr: &Attribute) -> Result<()> { ... }
    fn print_attribute_inline(&mut self, attr: &Attribute, is_inline: bool) -> Result<()> { ... }
    fn print_meta_item(&mut self, item: &MetaItem) -> Result<()> { ... }
    fn space_if_not_bol(&mut self) -> Result<()> { ... }
    fn nbsp(&mut self) -> Result<()> { ... }
}

Required Methods

fn writer(&mut self) -> &mut Printer<'a>

fn boxes(&mut self) -> &mut Vec<Breaks>

fn comments(&mut self) -> &mut Option<Vec<Comment>>

fn cur_cmnt_and_lit(&mut self) -> &mut CurrentCommentAndLiteral

fn literals(&self) -> &Option<Vec<Literal>>

Provided Methods

fn word_space(&mut self, w: &str) -> Result<()>

fn popen(&mut self) -> Result<()>

fn pclose(&mut self) -> Result<()>

fn is_begin(&mut self) -> bool

fn is_end(&mut self) -> bool

fn is_bol(&mut self) -> bool

fn hardbreak_if_not_bol(&mut self) -> Result<()>

fn rbox(&mut self, u: usize, b: Breaks) -> Result<()>

fn ibox(&mut self, u: usize) -> Result<()>

fn end(&mut self) -> Result<()>

fn commasep<T, F>(&mut self, b: Breaks, elts: &[T], op: F) -> Result<()> where F: FnMut(&mut Self, &T) -> Result<()>

fn next_lit(&mut self, pos: BytePos) -> Option<Literal>

fn maybe_print_comment(&mut self, pos: BytePos) -> Result<()>

fn print_comment(&mut self, cmnt: &Comment) -> Result<()>

fn next_comment(&mut self) -> Option<Comment>

fn print_literal(&mut self, lit: &Lit) -> Result<()>

fn print_string(&mut self, st: &str, style: StrStyle) -> Result<()>

fn print_inner_attributes(&mut self, attrs: &[Attribute]) -> Result<()>

fn print_inner_attributes_no_trailing_hardbreak(&mut self, attrs: &[Attribute]) -> Result<()>

fn print_outer_attributes(&mut self, attrs: &[Attribute]) -> Result<()>

fn print_inner_attributes_inline(&mut self, attrs: &[Attribute]) -> Result<()>

fn print_outer_attributes_inline(&mut self, attrs: &[Attribute]) -> Result<()>

fn print_either_attributes(&mut self, attrs: &[Attribute], kind: AttrStyle, is_inline: bool, trailing_hardbreak: bool) -> Result<()>

fn print_attribute(&mut self, attr: &Attribute) -> Result<()>

fn print_attribute_inline(&mut self, attr: &Attribute, is_inline: bool) -> Result<()>

fn print_meta_item(&mut self, item: &MetaItem) -> Result<()>

fn space_if_not_bol(&mut self) -> Result<()>

fn nbsp(&mut self) -> Result<()>

Implementors