pub struct TcpConfig { /* private fields */ }Available on crate feature
transport-tcp and (crate features std or tokio) only.Expand description
Implementations§
Source§impl TcpConfig
impl TcpConfig
Sourcepub fn from_stream(stream: TcpStream) -> Result<Self>
pub fn from_stream(stream: TcpStream) -> Result<Self>
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<Self>
pub fn from_listener(listener: TcpListener) -> Result<Self>
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
Available on crate feature tokio only.
impl AsyncConnectable for TcpConfig
Available on crate feature
tokio only.Source§impl Connectable for TcpConfig
impl Connectable for TcpConfig
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