pub struct Handler { /* private fields */ }
Expand description
The standard, blocking TCP I/O handler.
This handler makes use of the standard, blocking
std::net::TcpStream
to read from and write to TCP streams.
Implementations§
Source§impl Handler
impl Handler
Sourcepub fn new(host: impl AsRef<str>, port: u16) -> Result<Self>
pub fn new(host: impl AsRef<str>, port: u16) -> Result<Self>
Builds a new handler.
This function does perform I/O, as it connects to the TCP stream matching the given hostname and port.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handler
impl RefUnwindSafe for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl UnwindSafe for Handler
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