pub struct TcpConfig { /* private fields */ }Expand description
Implementations§
Source§impl TcpConfig
impl TcpConfig
Sourcepub fn from_stream(stream: TcpStream) -> Result<TcpConfig, Error>
pub fn from_stream(stream: TcpStream) -> Result<TcpConfig, Error>
Creates a TCP client configuration from an already connected stream.
Socket-backed configurations are one-shot, including across clones.
Sourcepub fn from_listener(listener: TcpListener) -> Result<TcpConfig, Error>
pub fn from_listener(listener: TcpListener) -> Result<TcpConfig, Error>
Creates a TCP server configuration from an already bound listener.
Socket-backed configurations are one-shot, including across clones.
Trait Implementations§
Source§impl AsyncConnectable for TcpConfig
impl AsyncConnectable for TcpConfig
Source§impl Connectable for TcpConfig
impl Connectable for TcpConfig
Source§impl From<TcpConfig> for ConnectionAddress
Available on crate feature transport-tcp only.
impl From<TcpConfig> for ConnectionAddress
Available on crate feature
transport-tcp only.Source§fn from(value: TcpConfig) -> ConnectionAddress
fn from(value: TcpConfig) -> ConnectionAddress
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TcpConfig
impl RefUnwindSafe for TcpConfig
impl Send for TcpConfig
impl Sync for TcpConfig
impl Unpin for TcpConfig
impl UnsafeUnpin for TcpConfig
impl UnwindSafe for TcpConfig
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