Struct protobuf_build::Builder
source · pub struct Builder { /* private fields */ }
Implementations§
source§impl Builder
impl Builder
pub fn generate_files(&self)
source§impl Builder
impl Builder
pub fn new() -> Builder
pub fn include_google_protos(&mut self) -> &mut Self
pub fn generate(&self)
sourcepub fn search_dir_for_protos(&mut self, proto_dir: &str) -> &mut Self
pub fn search_dir_for_protos(&mut self, proto_dir: &str) -> &mut Self
Finds proto files to operate on in the proto_dir
directory.
pub fn files<T: ToString>(&mut self, files: &[T]) -> &mut Self
pub fn includes<T: ToString>(&mut self, includes: &[T]) -> &mut Self
pub fn append_include(&mut self, include: impl Into<String>) -> &mut Self
pub fn black_list<T: ToString>(&mut self, black_list: &[T]) -> &mut Self
sourcepub fn append_to_black_list(&mut self, include: impl Into<String>) -> &mut Self
pub fn append_to_black_list(&mut self, include: impl Into<String>) -> &mut Self
Add the name of an include file to the builder’s black list.
Files named on the black list are not made modules of the generated program.
pub fn out_dir(&mut self, out_dir: impl Into<String>) -> &mut Self
sourcepub fn package_name(&mut self, package_name: impl Into<String>) -> &mut Self
pub fn package_name(&mut self, package_name: impl Into<String>) -> &mut Self
If specified, a module with the given name will be generated which re-exports all generated items.
This is ignored by Prost, since Prost uses the package names of protocols in any case.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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