Struct protobuf::code_writer::CodeWriter
[−]
[src]
pub struct CodeWriter<'a> { /* fields omitted */ }
Methods
impl<'a> CodeWriter<'a>
[src]
fn new(writer: &'a mut Write) -> CodeWriter<'a>
fn write_line<S: AsRef<str>>(&mut self, line: S)
fn write_generated(&mut self)
fn todo(&mut self, message: &str)
fn indented<F>(&mut self, cb: F) where F: Fn(&mut CodeWriter)
fn commented<F>(&mut self, cb: F) where F: Fn(&mut CodeWriter)
fn lazy_static<S1: AsRef<str>, S2: AsRef<str>>(&mut self, name: S1, ty: S2)
fn lazy_static_decl_get<S1: AsRef<str>, S2: AsRef<str>, F>(&mut self,
name: S1,
ty: S2,
init: F) where F: Fn(&mut CodeWriter)
name: S1,
ty: S2,
init: F) where F: Fn(&mut CodeWriter)
fn block<S1: AsRef<str>, S2: AsRef<str>, F>(&mut self,
first_line: S1,
last_line: S2,
cb: F) where F: Fn(&mut CodeWriter)
first_line: S1,
last_line: S2,
cb: F) where F: Fn(&mut CodeWriter)
fn expr_block<S: AsRef<str>, F>(&mut self, prefix: S, cb: F) where F: Fn(&mut CodeWriter)
fn stmt_block<S: AsRef<str>, F>(&mut self, prefix: S, cb: F) where F: Fn(&mut CodeWriter)
fn unsafe_expr<F>(&mut self, cb: F) where F: Fn(&mut CodeWriter)
fn impl_self_block<S: AsRef<str>, F>(&mut self, name: S, cb: F) where F: Fn(&mut CodeWriter)
fn impl_for_block<S1: AsRef<str>, S2: AsRef<str>, F>(&mut self,
tr: S1,
ty: S2,
cb: F) where F: Fn(&mut CodeWriter)
tr: S1,
ty: S2,
cb: F) where F: Fn(&mut CodeWriter)
fn unsafe_impl(&mut self, what: &str, for_what: &str)
fn pub_struct<S: AsRef<str>, F>(&mut self, name: S, cb: F) where F: Fn(&mut CodeWriter)
fn def_struct<S: AsRef<str>, F>(&mut self, name: S, cb: F) where F: Fn(&mut CodeWriter)
fn pub_enum<F>(&mut self, name: &str, cb: F) where F: Fn(&mut CodeWriter)
fn pub_trait<F>(&mut self, name: &str, cb: F) where F: Fn(&mut CodeWriter)
fn field_entry<S1: AsRef<str>, S2: AsRef<str>>(&mut self, name: S1, value: S2)
fn field_decl<S: AsRef<str>>(&mut self, name: S, field_type: &str)
fn derive(&mut self, derive: &[&str])
fn allow(&mut self, what: &[&str])
fn comment(&mut self, comment: &str)
fn fn_def(&mut self, sig: &str)
fn pub_fn<S: AsRef<str>, F>(&mut self, sig: S, cb: F) where F: Fn(&mut CodeWriter)
fn def_fn<S: AsRef<str>, F>(&mut self, sig: S, cb: F) where F: Fn(&mut CodeWriter)
fn while_block<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where F: Fn(&mut CodeWriter)
fn if_stmt<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where F: Fn(&mut CodeWriter)
fn if_else_stmt<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where F: Fn(&mut CodeWriter)
fn if_let_stmt<F>(&mut self, decl: &str, expr: &str, cb: F) where F: Fn(&mut CodeWriter)
fn if_let_else_stmt<F>(&mut self, decl: &str, expr: &str, cb: F) where F: Fn(&mut CodeWriter)
fn for_stmt<S1: AsRef<str>, S2: AsRef<str>, F>(&mut self,
over: S1,
varn: S2,
cb: F) where F: Fn(&mut CodeWriter)
over: S1,
varn: S2,
cb: F) where F: Fn(&mut CodeWriter)