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§
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
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
impl VortexWrite for ByteBufferMut
Source§impl VortexWrite for File
impl VortexWrite for File
Source§impl VortexWrite for File
impl VortexWrite for File
Source§impl VortexWrite for Vec<u8>
impl VortexWrite for Vec<u8>
Source§impl<T: Send> VortexWrite for Cursor<T>
impl<T: Send> VortexWrite for Cursor<T>
Source§impl<W: VortexWrite> VortexWrite for &mut W
impl<W: VortexWrite> VortexWrite for &mut W
Source§impl<W: VortexWrite> VortexWrite for Cursor<W>
impl<W: VortexWrite> VortexWrite for Cursor<W>
Implementors§
impl VortexWrite for FileWrite
impl VortexWrite for ObjectStoreWrite
impl<W: AsyncWrite + Unpin + Send> VortexWrite for AsyncWriteAdapter<W>
impl<W: VortexWrite> VortexWrite for Compat<W>
Compatibility adapter for VortexWrite implementations that are based on Tokio.