Struct iroh_io::ConcatenateSliceWriter
source · pub struct ConcatenateSliceWriter<W>(_);Expand description
Utility to convert an AsyncWrite into an AsyncSliceWriter by just ignoring the offsets
Implementations§
source§impl<W> ConcatenateSliceWriter<W>
impl<W> ConcatenateSliceWriter<W>
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Return the inner writer
Trait Implementations§
source§impl<W: AsyncWrite + Unpin + 'static> AsyncSliceWriter for ConcatenateSliceWriter<W>
impl<W: AsyncWrite + Unpin + 'static> AsyncSliceWriter for ConcatenateSliceWriter<W>
§type WriteBytesAtFuture<'a> = Pin<Box<dyn Future<Output = Result<(), Error>> + 'a, Global>>
type WriteBytesAtFuture<'a> = Pin<Box<dyn Future<Output = Result<(), Error>> + 'a, Global>>
The future returned by write_bytes_at
source§fn write_bytes_at(
&mut self,
_offset: u64,
data: Bytes
) -> Self::WriteBytesAtFuture<'_>
fn write_bytes_at( &mut self, _offset: u64, data: Bytes ) -> Self::WriteBytesAtFuture<'_>
Write the entire Bytes at the given position. Read more
§type WriteAtFuture<'a> = Pin<Box<dyn Future<Output = Result<(), Error>> + 'a, Global>>
type WriteAtFuture<'a> = Pin<Box<dyn Future<Output = Result<(), Error>> + 'a, Global>>
The future returned by write_at
source§fn write_at(&mut self, _offset: u64, bytes: &[u8]) -> Self::WriteAtFuture<'_>
fn write_at(&mut self, _offset: u64, bytes: &[u8]) -> Self::WriteAtFuture<'_>
Write the entire slice at the given position. Read more
§type SyncFuture<'a> = Pin<Box<dyn Future<Output = Result<(), Error>> + 'a, Global>>
type SyncFuture<'a> = Pin<Box<dyn Future<Output = Result<(), Error>> + 'a, Global>>
The future returned by sync
source§fn sync(&mut self) -> Self::SyncFuture<'_>
fn sync(&mut self) -> Self::SyncFuture<'_>
Sync any buffers to the underlying storage.
§type SetLenFuture<'a> = Ready<Result<(), Error>>
type SetLenFuture<'a> = Ready<Result<(), Error>>
The future returned by set_len
source§fn set_len(&mut self, _len: u64) -> Self::SetLenFuture<'_>
fn set_len(&mut self, _len: u64) -> Self::SetLenFuture<'_>
Set the length of the underlying storage.
Auto Trait Implementations§
impl<W> RefUnwindSafe for ConcatenateSliceWriter<W>where W: RefUnwindSafe,
impl<W> Send for ConcatenateSliceWriter<W>where W: Send,
impl<W> Sync for ConcatenateSliceWriter<W>where W: Sync,
impl<W> Unpin for ConcatenateSliceWriter<W>where W: Unpin,
impl<W> UnwindSafe for ConcatenateSliceWriter<W>where W: 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