Struct ttrpc_codegen::Codegen
source · [−]pub struct Codegen {
pub rust_protobuf_customize: ProtobufCustomize,
/* private fields */
}Expand description
Invoke pure rust codegen.
Fields
rust_protobuf_customize: ProtobufCustomizeCustomize rust-protobuf codegen
Implementations
sourceimpl Codegen
impl Codegen
sourcepub fn out_dir(&mut self, out_dir: impl AsRef<Path>) -> &mut Self
pub fn out_dir(&mut self, out_dir: impl AsRef<Path>) -> &mut Self
Set the output directory for codegen.
sourcepub fn includes(
&mut self,
includes: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
pub fn includes(
&mut self,
includes: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
Add include directories.
sourcepub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
pub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
Add inputs (.proto files).
sourcepub fn rust_protobuf(&mut self) -> &mut Self
pub fn rust_protobuf(&mut self) -> &mut Self
Generate rust-protobuf files along with ttrpc-rust.
sourcepub fn rust_protobuf_customize(
&mut self,
customize: ProtobufCustomize
) -> &mut Self
pub fn rust_protobuf_customize(
&mut self,
customize: ProtobufCustomize
) -> &mut Self
Customize code generated by rust-protobuf.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Codegen
impl Send for Codegen
impl Sync for Codegen
impl Unpin for Codegen
impl UnwindSafe for Codegen
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more