pub struct TcpStream(/* private fields */);
Implementations§
Source§impl TcpStream
impl TcpStream
Sourcepub fn connect(addr: &SocketAddress) -> Result<Self>
pub fn connect(addr: &SocketAddress) -> Result<Self>
Sourcepub fn connect_with_timeout(
addr: &SocketAddress,
timeout: Duration,
) -> Result<Self>
pub fn connect_with_timeout( addr: &SocketAddress, timeout: Duration, ) -> Result<Self>
Sourcepub fn try_connect(addr: &SocketAddress) -> Result<TcpTryConnect>
pub fn try_connect(addr: &SocketAddress) -> Result<TcpTryConnect>
Trait Implementations§
Source§impl Read for TcpStream
impl Read for TcpStream
Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Reads to the end of this Reader, Read more
Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Reads to the end of the provided buffer Read more
Source§impl Write for TcpStream
impl Write for TcpStream
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Tries to write the contents of the provided buffer into this writer
returning how many bytes were written. Read more
Source§fn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Writes the full buffer into this
Writer
Read moreAuto Trait Implementations§
impl Freeze for TcpStream
impl RefUnwindSafe for TcpStream
impl Send for TcpStream
impl Sync for TcpStream
impl Unpin for TcpStream
impl UnwindSafe for TcpStream
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