pub struct GeneratorConfigBuilder { /* private fields */ }Implementations§
Source§impl GeneratorConfigBuilder
impl GeneratorConfigBuilder
pub fn new() -> Self
pub fn proto_path(self, path: impl Into<PathBuf>) -> Self
pub fn output_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn enable_client(self, enable: bool) -> Self
pub fn enable_server(self, enable: bool) -> Self
pub fn client_mode(self, mode: ClientMode) -> Self
Sourcepub fn build(self) -> Result<GeneratorConfig>
pub fn build(self) -> Result<GeneratorConfig>
§Errors
Returns an error if proto_paths is empty.
Trait Implementations§
Source§impl Debug for GeneratorConfigBuilder
impl Debug for GeneratorConfigBuilder
Auto Trait Implementations§
impl Freeze for GeneratorConfigBuilder
impl RefUnwindSafe for GeneratorConfigBuilder
impl Send for GeneratorConfigBuilder
impl Sync for GeneratorConfigBuilder
impl Unpin for GeneratorConfigBuilder
impl UnsafeUnpin for GeneratorConfigBuilder
impl UnwindSafe for GeneratorConfigBuilder
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