[][src]Struct capnpc::codegen::CodeGenerationCommand

pub struct CodeGenerationCommand { /* fields omitted */ }

An invocation of the capnpc-rust code generation plugin.

Implementations

impl CodeGenerationCommand[src]

pub fn new() -> CodeGenerationCommand[src]

Creates a new code generation command with default options.

pub fn output_directory<P>(&mut self, path: P) -> &mut Self where
    P: AsRef<Path>, 
[src]

Sets the output directory.

pub fn default_parent_module(
    &mut self,
    default_parent_module: Vec<String>
) -> &mut Self
[src]

Sets the default parent module, indicating the scope in your crate where you will add the generated code.

This option can be overridden by the parentModule annotation defined in rust.capnp.

pub fn run<T>(&mut self, inp: T) -> Result<()> where
    T: Read
[src]

Generates Rust code according to a schema_capnp::code_generator_request read from inp.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.