[−][src]Struct queen_io::net::tcp::TcpStream
Implementations
impl TcpStream
[src]
pub fn connect<A: ToSocketAddrs>(addr: A) -> Result<TcpStream>
[src]
pub fn connect_timeout(
addr: &SocketAddr,
timeout: Duration
) -> Result<TcpStream>
[src]
addr: &SocketAddr,
timeout: Duration
) -> Result<TcpStream>
pub fn new(stream: TcpStream) -> Result<TcpStream>
[src]
pub fn from_stream(stream: TcpStream) -> TcpStreamⓘ
[src]
pub fn peer_addr(&self) -> Result<SocketAddr>
[src]
pub fn local_addr(&self) -> Result<SocketAddr>
[src]
pub fn try_clone(&self) -> Result<TcpStream>
[src]
pub fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
pub fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
pub fn read_timeout(&self) -> Result<Option<Duration>>
[src]
pub fn write_timeout(&self) -> Result<Option<Duration>>
[src]
pub fn shutdown(&self, how: Shutdown) -> Result<()>
[src]
pub fn peek(&self, buf: &mut [u8]) -> Result<usize>
[src]
pub fn set_nodelay(&self, nodelay: bool) -> Result<()>
[src]
pub fn nodelay(&self) -> Result<bool>
[src]
pub fn set_ttl(&self, ttl: u32) -> Result<()>
[src]
pub fn ttl(&self) -> Result<u32>
[src]
pub fn take_error(&self) -> Result<Option<Error>>
[src]
pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
[src]
Trait Implementations
impl AsRawFd for TcpStream
[src]
impl Debug for TcpStream
[src]
impl FromRawFd for TcpStream
[src]
unsafe fn from_raw_fd(fd: RawFd) -> TcpStreamⓘ
[src]
impl IntoRawFd for TcpStream
[src]
fn into_raw_fd(self) -> RawFd
[src]
impl Read for TcpStream
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
1.36.0[src]
fn is_read_vectored(&self) -> bool
[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl<'a> Read for &'a TcpStream
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
1.36.0[src]
fn is_read_vectored(&self) -> bool
[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl Source for TcpStream
[src]
fn add(
&self,
epoll: &Epoll,
token: Token,
interest: Ready,
opts: EpollOpt
) -> Result<()>
[src]
&self,
epoll: &Epoll,
token: Token,
interest: Ready,
opts: EpollOpt
) -> Result<()>
fn modify(
&self,
epoll: &Epoll,
token: Token,
interest: Ready,
opts: EpollOpt
) -> Result<()>
[src]
&self,
epoll: &Epoll,
token: Token,
interest: Ready,
opts: EpollOpt
) -> Result<()>
fn delete(&self, epoll: &Epoll) -> Result<()>
[src]
impl Write for TcpStream
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
fn is_write_vectored(&self) -> bool
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
impl<'a> Write for &'a TcpStream
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
fn is_write_vectored(&self) -> bool
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for TcpStream
impl Send for TcpStream
impl Sync for TcpStream
impl Unpin for TcpStream
impl UnwindSafe for TcpStream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,