[][src]Struct protobuf::code_writer::CodeWriter

pub struct CodeWriter<'a> { /* fields omitted */ }

Methods

impl<'a> CodeWriter<'a>[src]

pub fn new(writer: &'a mut dyn Write) -> CodeWriter<'a>[src]

pub fn write_line<S: AsRef<str>>(&mut self, line: S)[src]

pub fn write_generated(&mut self)[src]

pub fn todo(&mut self, message: &str)[src]

pub fn unimplemented(&mut self)[src]

pub fn indented<F>(&mut self, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn commented<F>(&mut self, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn pub_const(&mut self, name: &str, field_type: &str, init: &str)[src]

pub fn lazy_static(&mut self, name: &str, ty: &str)[src]

pub fn lazy_static_decl_get<F>(&mut self, name: &str, ty: &str, init: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn lazy_static_decl_get_simple(&mut self, name: &str, ty: &str, init: &str)[src]

pub fn block<F>(&mut self, first_line: &str, last_line: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn expr_block<F>(&mut self, prefix: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn stmt_block<S: AsRef<str>, F>(&mut self, prefix: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn unsafe_expr<F>(&mut self, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn impl_self_block<S: AsRef<str>, F>(&mut self, name: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn impl_for_block<S1: AsRef<str>, S2: AsRef<str>, F>(
    &mut self,
    tr: S1,
    ty: S2,
    cb: F
) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn unsafe_impl(&mut self, what: &str, for_what: &str)[src]

pub fn pub_struct<S: AsRef<str>, F>(&mut self, name: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn def_struct<S: AsRef<str>, F>(&mut self, name: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn pub_enum<F>(&mut self, name: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn pub_trait<F>(&mut self, name: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn field_entry(&mut self, name: &str, value: &str)[src]

pub fn field_decl(&mut self, name: &str, field_type: &str)[src]

pub fn pub_field_decl(&mut self, name: &str, field_type: &str)[src]

pub fn field_decl_vis(&mut self, vis: Visibility, name: &str, field_type: &str)[src]

pub fn derive(&mut self, derive: &[&str])[src]

pub fn allow(&mut self, what: &[&str])[src]

pub fn comment(&mut self, comment: &str)[src]

pub fn fn_def(&mut self, sig: &str)[src]

pub fn fn_block<F>(&mut self, public: bool, sig: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn pub_fn<F>(&mut self, sig: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn def_fn<F>(&mut self, sig: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn def_mod<F>(&mut self, name: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn pub_mod<F>(&mut self, name: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn while_block<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn if_stmt<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn if_else_stmt<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn if_let_stmt<F>(&mut self, decl: &str, expr: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn if_let_else_stmt<F>(&mut self, decl: &str, expr: &str, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn for_stmt<S1: AsRef<str>, S2: AsRef<str>, F>(
    &mut self,
    over: S1,
    varn: S2,
    cb: F
) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn match_block<S: AsRef<str>, F>(&mut self, value: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn match_expr<S: AsRef<str>, F>(&mut self, value: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn case_block<S: AsRef<str>, F>(&mut self, cond: S, cb: F) where
    F: Fn(&mut CodeWriter), 
[src]

pub fn case_expr<S1: AsRef<str>, S2: AsRef<str>>(&mut self, cond: S1, body: S2)[src]

Auto Trait Implementations

impl<'a> !Send for CodeWriter<'a>

impl<'a> Unpin for CodeWriter<'a>

impl<'a> !Sync for CodeWriter<'a>

impl<'a> !UnwindSafe for CodeWriter<'a>

impl<'a> !RefUnwindSafe for CodeWriter<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]