pub struct Builder { /* private fields */ }Expand description
Builder for configuring and running the validation code generator.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn file_descriptor_set_bytes(self, bytes: Vec<u8>) -> Self
pub fn file_descriptor_set_bytes(self, bytes: Vec<u8>) -> Self
Set the file descriptor set bytes directly.
Sourcepub fn out_dir(self, path: impl Into<PathBuf>) -> Self
pub fn out_dir(self, path: impl Into<PathBuf>) -> Self
Override the output directory (defaults to OUT_DIR env var).
Sourcepub fn extern_path(
self,
proto_path: impl Into<String>,
rust_path: impl Into<String>,
) -> Self
pub fn extern_path( self, proto_path: impl Into<String>, rust_path: impl Into<String>, ) -> Self
Map a proto package path to a Rust module path.
This is equivalent to prost-build’s extern_path and should match
your prost-build configuration.
§Example
prost_protovalidate_build::Builder::new()
.extern_path(".my.package", "::my_crate::my_package");Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin 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