futures::io

Struct WriteHalf

Source
pub struct WriteHalf<T> { /* private fields */ }
Expand description

The writable half of an object returned from AsyncRead::split.

Trait Implementations§

Source§

impl<T> AsyncWrite for WriteHalf<T>
where T: AsyncWrite,

Source§

fn poll_write( &mut self, cx: &mut Context<'_>, buf: &[u8], ) -> Result<Async<usize>, Error>

Attempt to write bytes from buf into the object. Read more
Source§

fn poll_vectored_write( &mut self, cx: &mut Context<'_>, vec: &[&IoVec], ) -> Result<Async<usize>, Error>

Attempt to write bytes from vec into the object using vectored IO operations. Read more
Source§

fn poll_flush(&mut self, cx: &mut Context<'_>) -> Result<Async<()>, Error>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
Source§

fn poll_close(&mut self, cx: &mut Context<'_>) -> Result<Async<()>, Error>

Attempt to close the object. Read more
Source§

impl<T> Debug for WriteHalf<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for WriteHalf<T>

§

impl<T> !RefUnwindSafe for WriteHalf<T>

§

impl<T> Send for WriteHalf<T>
where T: Send,

§

impl<T> Sync for WriteHalf<T>
where T: Send,

§

impl<T> Unpin for WriteHalf<T>

§

impl<T> !UnwindSafe for WriteHalf<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsyncWriteExt for T
where T: AsyncWrite + ?Sized,

Source§

fn flush(self) -> Flush<Self>
where Self: Sized,

Creates a future which will entirely flush this AsyncWrite and then return self. Read more
Source§

fn close(self) -> Close<Self>
where Self: Sized,

Creates a future which will entirely close this AsyncWrite and then return self. Read more
Source§

fn write_all<T>(self, buf: T) -> WriteAll<Self, T>
where T: AsRef<[u8]>, Self: Sized,

Write a Buf into this value, returning how many bytes were written. Creates a future that will write the entire contents of the buffer buf into this AsyncWrite. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.