[−][src]Struct fumio::net::TcpStream
A TCP connection
Methods
impl TcpStream
[src]
pub fn from_std(
stream: TcpStream,
handle: LazyHandle
) -> Result<TcpStream, Error>
[src]
stream: TcpStream,
handle: LazyHandle
) -> Result<TcpStream, Error>
Wraps an already connected tcp stream
pub fn from_mio(
stream: TcpStream,
handle: LazyHandle
) -> Result<TcpStream, Error>
[src]
stream: TcpStream,
handle: LazyHandle
) -> Result<TcpStream, Error>
Wraps an already connected tcp stream
pub fn connect(target: SocketAddr) -> Result<TcpConnectFuture, Error>
[src]
Create a new TCP connection to the given target.
pub fn connect_with(
target: SocketAddr,
handle: LazyHandle
) -> Result<TcpConnectFuture, Error>
[src]
target: SocketAddr,
handle: LazyHandle
) -> Result<TcpConnectFuture, Error>
Create a new TCP connection to the given target.
pub fn connect_builder(
builder: TcpBuilder,
target: SocketAddr,
handle: LazyHandle
) -> Result<TcpConnectFuture, Error>
[src]
builder: TcpBuilder,
target: SocketAddr,
handle: LazyHandle
) -> Result<TcpConnectFuture, Error>
Create a new TCP connection to the given target using a prepared socket.
Trait Implementations
impl AsyncRead for TcpStream
[src]
fn poll_read(
self: Pin<&mut TcpStream>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut TcpStream>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
unsafe fn initializer(&self) -> Initializer
[src]
Determines if this AsyncRead
er can work with buffers of uninitialized memory. Read more
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
Attempt to read from the AsyncRead
into bufs
using vectored IO operations. Read more
impl TryFrom<TcpStream> for TcpStream
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: TcpStream) -> Result<TcpStream, Error>
[src]
impl TryFrom<TcpStream> for TcpStream
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: TcpStream) -> Result<TcpStream, Error>
[src]
impl Debug for TcpStream
[src]
impl AsyncWrite for TcpStream
[src]
fn poll_write(
self: Pin<&mut TcpStream>,
cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut TcpStream>,
cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize, Error>>
fn poll_flush(
self: Pin<&mut TcpStream>,
cx: &mut Context
) -> Poll<Result<(), Error>>
[src]
self: Pin<&mut TcpStream>,
cx: &mut Context
) -> Poll<Result<(), Error>>
fn poll_close(
self: Pin<&mut TcpStream>,
cx: &mut Context
) -> Poll<Result<(), Error>>
[src]
self: Pin<&mut TcpStream>,
cx: &mut Context
) -> Poll<Result<(), Error>>
fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
Attempt to write bytes from bufs
into the object using vectored IO operations. Read more
Auto Trait Implementations
impl Send for TcpStream
impl Unpin for TcpStream
impl Sync for TcpStream
impl !UnwindSafe for TcpStream
impl !RefUnwindSafe for TcpStream
Blanket Implementations
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,