Skip to main content

VortexWrite

Trait VortexWrite 

Source
pub trait VortexWrite: Send {
    // Required methods
    fn write_all<B: IoBuf>(
        &mut self,
        buffer: B,
    ) -> impl Future<Output = Result<B>> + Send;
    fn flush(&mut self) -> impl Future<Output = Result<()>> + Send;
    fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send;
}
Expand description

The unified write trait for Vortex I/O sinks.

Implementations and their returned futures are Send, mirroring VortexReadAt, so writers can be driven from multi-threaded executors and moved into spawned tasks.

Required Methods§

Source

fn write_all<B: IoBuf>( &mut self, buffer: B, ) -> impl Future<Output = Result<B>> + Send

Source

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

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 VortexWrite for ByteBufferMut

Source§

fn write_all<B: IoBuf>( &mut self, buffer: B, ) -> impl Future<Output = Result<B>> + Send

Source§

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

impl VortexWrite for File

Source§

async fn write_all<B: IoBuf>(&mut self, buffer: B) -> Result<B>

Source§

async fn flush(&mut self) -> Result<()>

Source§

async fn shutdown(&mut self) -> Result<()>

Source§

impl VortexWrite for File

Source§

async fn write_all<B: IoBuf>(&mut self, buffer: B) -> Result<B>

Source§

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

impl VortexWrite for Vec<u8>

Source§

fn write_all<B: IoBuf>( &mut self, buffer: B, ) -> impl Future<Output = Result<B>> + Send

Source§

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

impl<T: Send> VortexWrite for Cursor<T>
where Cursor<T>: Write,

Source§

fn write_all<B: IoBuf>( &mut self, buffer: B, ) -> impl Future<Output = Result<B>> + Send

Source§

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

impl<W: VortexWrite> VortexWrite for &mut W

Source§

fn write_all<B: IoBuf>( &mut self, buffer: B, ) -> impl Future<Output = Result<B>> + Send

Source§

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

impl<W: VortexWrite> VortexWrite for Cursor<W>

Source§

fn write_all<B: IoBuf>( &mut self, buffer: B, ) -> impl Future<Output = Result<B>> + Send

Source§

fn flush(&mut self) -> impl Future<Output = Result<()>> + Send

Source§

fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send

Implementors§

Source§

impl VortexWrite for FileWrite

Source§

impl VortexWrite for ObjectStoreWrite

Source§

impl<W: AsyncWrite + Unpin + Send> VortexWrite for AsyncWriteAdapter<W>

Source§

impl<W: VortexWrite> VortexWrite for Compat<W>

Compatibility adapter for VortexWrite implementations that are based on Tokio.