pub struct WebCodegenConfigBuilder { /* private fields */ }Expand description
Configuration builder.
Implementations§
Source§impl WebCodegenConfigBuilder
impl WebCodegenConfigBuilder
Sourcepub fn proto_file<P: Into<PathBuf>>(self, path: P) -> Self
pub fn proto_file<P: Into<PathBuf>>(self, path: P) -> Self
Add one proto file.
Sourcepub fn proto_files<I, P>(self, paths: I) -> Self
pub fn proto_files<I, P>(self, paths: I) -> Self
Add multiple proto files.
Sourcepub fn rust_output<P: Into<PathBuf>>(self, dir: P) -> Self
pub fn rust_output<P: Into<PathBuf>>(self, dir: P) -> Self
Set the Rust output directory.
Sourcepub fn with_react_hooks(self, enabled: bool) -> Self
pub fn with_react_hooks(self, enabled: bool) -> Self
Enable React Hooks generation.
Sourcepub fn with_formatting(self, enabled: bool) -> Self
pub fn with_formatting(self, enabled: bool) -> Self
Enable code formatting.
Sourcepub fn custom_templates<P: Into<PathBuf>>(self, dir: P) -> Self
pub fn custom_templates<P: Into<PathBuf>>(self, dir: P) -> Self
Set a custom template directory.
Sourcepub fn build(self) -> Result<WebCodegenConfig, CodegenError>
pub fn build(self) -> Result<WebCodegenConfig, CodegenError>
Build the configuration.
Trait Implementations§
Source§impl Default for WebCodegenConfigBuilder
impl Default for WebCodegenConfigBuilder
Source§fn default() -> WebCodegenConfigBuilder
fn default() -> WebCodegenConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WebCodegenConfigBuilder
impl RefUnwindSafe for WebCodegenConfigBuilder
impl Send for WebCodegenConfigBuilder
impl Sync for WebCodegenConfigBuilder
impl Unpin for WebCodegenConfigBuilder
impl UnsafeUnpin for WebCodegenConfigBuilder
impl UnwindSafe for WebCodegenConfigBuilder
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