pub struct TcpStream(/* private fields */);
Implementations§
Source§impl TcpStream
impl TcpStream
pub async fn connect(addr: impl ToSocketAddrs) -> Result<TcpStream>
pub fn local_addr(&self) -> Result<SocketAddr>
pub fn peer_addr(&self) -> Result<SocketAddr>
pub fn nodelay(&self) -> Result<bool>
pub async fn peek(&self, buf: &mut [u8]) -> Result<usize>
pub fn set_nodelay(&self, nodelay: bool) -> Result<()>
pub fn set_ttl(&self, ttl: u32) -> Result<()>
pub fn ttl(&self) -> Result<u32>
Trait Implementations§
Auto 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