pub struct ConnectOptions {
pub setup_timeout: Duration,
pub limits: ClientLimits,
}Expand description
Connection configuration. Builders have no I/O or background side effects.
Fields§
§setup_timeout: DurationTotal time allowed for dial and protocol establishment.
limits: ClientLimitsRequested local resource limits; a protocol may reduce these.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn setup_timeout(self, timeout: Duration) -> Self
pub fn setup_timeout(self, timeout: Duration) -> Self
Set the deadline for the complete setup attempt.
Sourcepub fn limits(
self,
configure: impl FnOnce(ClientLimits) -> ClientLimits,
) -> Self
pub fn limits( self, configure: impl FnOnce(ClientLimits) -> ClientLimits, ) -> Self
Configure resource bounds before connecting.
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 (const: unstable) · 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
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnsafeUnpin 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