pub struct CodegenConfig {
pub proto_file: PathBuf,
pub out_dir: PathBuf,
pub module_name: String,
pub include_paths: Vec<PathBuf>,
}Expand description
Configuration for code generation
Fields§
§proto_file: PathBufProto file to process
out_dir: PathBufOutput directory for generated code
module_name: StringModule name for generated code
include_paths: Vec<PathBuf>Include paths for proto imports
Implementations§
Source§impl CodegenConfig
impl CodegenConfig
Sourcepub fn from_proto(proto_file: impl AsRef<Path>) -> Self
pub fn from_proto(proto_file: impl AsRef<Path>) -> Self
Create config from proto file path
Sourcepub fn module_name(self, name: impl Into<String>) -> Self
pub fn module_name(self, name: impl Into<String>) -> Self
Set module name
Sourcepub fn include_paths(self, paths: &[&str]) -> Self
pub fn include_paths(self, paths: &[&str]) -> Self
Set include paths for proto imports
Auto Trait Implementations§
impl Freeze for CodegenConfig
impl RefUnwindSafe for CodegenConfig
impl Send for CodegenConfig
impl Sync for CodegenConfig
impl Unpin for CodegenConfig
impl UnsafeUnpin for CodegenConfig
impl UnwindSafe for CodegenConfig
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