pub struct PartialWrite<W, Ops> { /* private fields */ }Expand description
Wraps a reader and modifies its read operations according to the given iterator of PartialOps.
Implementations§
Source§impl<W, Ops> PartialWrite<W, Ops>
impl<W, Ops> PartialWrite<W, Ops>
Sourcepub fn new(writer: W, ops: Ops) -> PartialWrite<W, Ops>
pub fn new(writer: W, ops: Ops) -> PartialWrite<W, Ops>
Create a new PartialWrite, wrapping the given W and modifying its io operations via the
given Ops.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consumes this PartialWrite, returning the underlying writer.
Trait Implementations§
Source§impl<W, Ops> AsyncRead for PartialWrite<W, Ops>where
W: AsyncRead,
impl<W, Ops> AsyncRead for PartialWrite<W, Ops>where
W: AsyncRead,
Source§impl<W, Ops> AsyncWrite for PartialWrite<W, Ops>
impl<W, Ops> AsyncWrite for PartialWrite<W, Ops>
Source§fn poll_write(&mut self, cx: &mut Context<'_>, buf: &[u8]) -> Poll<usize, Error>
fn poll_write(&mut self, cx: &mut Context<'_>, buf: &[u8]) -> Poll<usize, Error>
Attempt to write bytes from
buf into the object. Read moreSource§fn poll_flush(&mut self, cx: &mut Context<'_>) -> Poll<(), Error>
fn poll_flush(&mut self, cx: &mut Context<'_>) -> Poll<(), Error>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more
Auto Trait Implementations§
impl<W, Ops> Freeze for PartialWrite<W, Ops>
impl<W, Ops> RefUnwindSafe for PartialWrite<W, Ops>where
W: RefUnwindSafe,
Ops: RefUnwindSafe,
impl<W, Ops> Send for PartialWrite<W, Ops>
impl<W, Ops> Sync for PartialWrite<W, Ops>
impl<W, Ops> Unpin for PartialWrite<W, Ops>
impl<W, Ops> UnwindSafe for PartialWrite<W, Ops>where
W: UnwindSafe,
Ops: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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