pub struct Codegen { /* private fields */ }
Expand description
Invoke pure rust codegen.
Implementations§
Source§impl 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. Support None out_dir
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-codegen.
Sourcepub fn rust_protobuf_customize_callback(
&mut self,
customize: impl ProtobufCustomizeCallback,
) -> &mut Self
pub fn rust_protobuf_customize_callback( &mut self, customize: impl ProtobufCustomizeCallback, ) -> &mut Self
Callback for dynamic per-element customization of rust-protobuf-codegen.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Codegen
impl !RefUnwindSafe for Codegen
impl !Send for Codegen
impl !Sync for Codegen
impl Unpin for Codegen
impl !UnwindSafe for Codegen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more