Skip to main content

AsyncPatchSink

Trait AsyncPatchSink 

Source
pub trait AsyncPatchSink: AsyncSink {
    // Required method
    async fn patch(
        &mut self,
        back: u32,
        bytes: &[u8],
    ) -> Result<(), Self::Error>;
}
Available on crate feature async only.
Expand description

An AsyncSink that can overwrite bytes it already took, for AsyncOnePass, as PatchSink has it.

Required Methods§

Source

async fn patch(&mut self, back: u32, bytes: &[u8]) -> Result<(), Self::Error>

Overwrites the bytes starting back bytes before the end of what was written, as PatchSink::patch does.

§Errors

Whatever stops the sink rewriting them.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S: AsyncPatchSink + ?Sized> AsyncPatchSink for &mut S

Source§

async fn patch(&mut self, back: u32, bytes: &[u8]) -> Result<(), S::Error>

Implementors§

Source§

impl<W: Write + Seek> AsyncPatchSink for EmbeddedIo<W>

Available on crate feature embedded-io-async and (crate features embedded-io-async or embedded-io) only.