pub struct ServiceConfigBuilder(/* private fields */);
Expand description
A builder type for ServiceConfig
s.
Implementations§
source§impl ServiceConfigBuilder
impl ServiceConfigBuilder
sourcepub fn security(&mut self, security: SecurityConfig) -> &mut Self
pub fn security(&mut self, security: SecurityConfig) -> &mut Self
Sets the security configuration.
sourcepub fn proxy(&mut self, proxy: ProxyConfig) -> &mut Self
pub fn proxy(&mut self, proxy: ProxyConfig) -> &mut Self
Sets the proxy configuration.
sourcepub fn connect_timeout(&mut self, connect_timeout: Duration) -> &mut Self
pub fn connect_timeout(&mut self, connect_timeout: Duration) -> &mut Self
Sets the connect timeout.
sourcepub fn read_timeout(&mut self, read_timeout: Duration) -> &mut Self
pub fn read_timeout(&mut self, read_timeout: Duration) -> &mut Self
Sets the read timeout.
sourcepub fn write_timeout(&mut self, write_timeout: Duration) -> &mut Self
pub fn write_timeout(&mut self, write_timeout: Duration) -> &mut Self
Sets the write timeout.
sourcepub fn backoff_slot_size(&mut self, backoff_slot_size: Duration) -> &mut Self
pub fn backoff_slot_size(&mut self, backoff_slot_size: Duration) -> &mut Self
Sets the backoff slot size.
sourcepub fn max_num_retries(&mut self, max_num_retries: u32) -> &mut Self
pub fn max_num_retries(&mut self, max_num_retries: u32) -> &mut Self
Sets the maximum number of retries for failed RPCs.
sourcepub fn build(&self) -> ServiceConfig
pub fn build(&self) -> ServiceConfig
Creates a new ServiceConfig
.
Trait Implementations§
source§impl Default for ServiceConfigBuilder
impl Default for ServiceConfigBuilder
source§fn default() -> ServiceConfigBuilder
fn default() -> ServiceConfigBuilder
Returns the “default value” for a type. Read more
source§impl From<ServiceConfig> for ServiceConfigBuilder
impl From<ServiceConfig> for ServiceConfigBuilder
source§fn from(config: ServiceConfig) -> ServiceConfigBuilder
fn from(config: ServiceConfig) -> ServiceConfigBuilder
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServiceConfigBuilder
impl RefUnwindSafe for ServiceConfigBuilder
impl Send for ServiceConfigBuilder
impl Sync for ServiceConfigBuilder
impl Unpin for ServiceConfigBuilder
impl UnwindSafe for ServiceConfigBuilder
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