pub struct ConnectOptions { /* private fields */ }Expand description
Options for Connect operation.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn with_user(
self,
name: impl Into<String>,
password: impl Into<String>,
) -> ConnectOptions
pub fn with_user( self, name: impl Into<String>, password: impl Into<String>, ) -> ConnectOptions
name is the identifier for the distributed shared lock to be acquired.
Sourcepub fn with_keep_alive(
self,
interval: Duration,
timeout: Duration,
) -> ConnectOptions
pub fn with_keep_alive( self, interval: Duration, timeout: Duration, ) -> ConnectOptions
Enable HTTP2 keep-alive with interval and timeout.
Sourcepub fn with_timeout(self, timeout: Duration) -> ConnectOptions
pub fn with_timeout(self, timeout: Duration) -> ConnectOptions
Apply a timeout to each request.
Sourcepub fn with_connect_timeout(self, timeout: Duration) -> ConnectOptions
pub fn with_connect_timeout(self, timeout: Duration) -> ConnectOptions
Apply a timeout to connecting to the endpoint.
Sourcepub fn with_tcp_keepalive(self, tcp_keepalive: Duration) -> ConnectOptions
pub fn with_tcp_keepalive(self, tcp_keepalive: Duration) -> ConnectOptions
Enable TCP keepalive.
Sourcepub fn with_keep_alive_while_idle(self, enabled: bool) -> ConnectOptions
pub fn with_keep_alive_while_idle(self, enabled: bool) -> ConnectOptions
Whether send keep alive pings even there are no active requests.
If disabled, keep-alive pings are only sent while there are opened request/response streams.
If enabled, pings are also sent when no streams are active.
NOTE: Some implementations of gRPC server may send GOAWAY if there are too many pings.
This would be useful if you meet some error like too many pings.
Sourcepub fn with_require_leader(self, require_leader: bool) -> ConnectOptions
pub fn with_require_leader(self, require_leader: bool) -> ConnectOptions
Whether to enforce that a leader be present in the etcd cluster.
Sourcepub const fn new() -> ConnectOptions
pub const fn new() -> ConnectOptions
Creates a ConnectOptions.
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnwindSafe for ConnectOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request