pub struct Config {
pub address: Option<IpAddr>,
pub port: u16,
pub versions: Versions,
pub accept_timeout: Duration,
}Expand description
Configure the connection.
See extra features compression or encryption to enable extra fields.
Config can be interpreted directly from a string, see examples in Session.
Fields§
§address: Option<IpAddr>address the destination where to connect to when connecting, or the address to bind to when hosting.
port: u16port to connect to when client or to bind to when hosting.
versions: VersionsVersioning for the protocol.
accept_timeout: DurationHow long to wait for a new accepted client that did not confirm its session with the protocol. Defaults to 5 secs. While waiting for this to time out, new connections are delayed from being accepted.
Trait Implementations§
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