pub struct Config { /* private fields */ }Expand description
Code generation configuration
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_prost(prost: Config) -> Self
pub fn from_prost(prost: Config) -> Self
Returns a new Config with pre-configured prost.
You can tweak the configuration how the proto buffers are generated and use this config.
Sourcepub fn enable_client(&mut self, enable: bool) -> &mut Self
pub fn enable_client(&mut self, enable: bool) -> &mut Self
Enable gRPC client code generation
Sourcepub fn enable_server(&mut self, enable: bool) -> &mut Self
pub fn enable_server(&mut self, enable: bool) -> &mut Self
Enable gRPC server code generation
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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