[][src]Struct fumio::net::TcpStream

#[must_use = "A TCP stream does nothing if not actually used"]
pub struct TcpStream { /* fields omitted */ }

A TCP connection

Methods

impl TcpStream[src]

pub fn from_std(
    stream: TcpStream,
    handle: LazyHandle
) -> Result<TcpStream, Error>
[src]

Wraps an already connected tcp stream

pub fn from_mio(
    stream: TcpStream,
    handle: LazyHandle
) -> Result<TcpStream, Error>
[src]

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]

Create a new TCP connection to the given target.

pub fn connect_builder(
    builder: TcpBuilder,
    target: SocketAddr,
    handle: LazyHandle
) -> Result<TcpConnectFuture, Error>
[src]

Create a new TCP connection to the given target using a prepared socket.

Trait Implementations

impl AsyncRead for TcpStream[src]

unsafe fn initializer(&self) -> Initializer[src]

Determines if this AsyncReader 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]

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.

impl TryFrom<TcpStream> for TcpStream[src]

type Error = Error

The type returned in the event of a conversion error.

impl Debug for TcpStream[src]

impl AsyncWrite for TcpStream[src]

fn poll_write_vectored(
    self: Pin<&mut Self>,
    cx: &mut Context,
    bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
[src]

Attempt to write bytes from bufs into the object using vectored IO operations. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]