Struct iroh_bytes::store::mem::MutableMemFile
source · pub struct MutableMemFile(/* private fields */);Expand description
A mutable file like object that can be used for partial entries.
Implementations§
Trait Implementations§
source§impl AsyncSliceReader for MutableMemFile
impl AsyncSliceReader for MutableMemFile
§type ReadAtFuture<'a> = <BytesMut as AsyncSliceReader>::ReadAtFuture<'a>
type ReadAtFuture<'a> = <BytesMut as AsyncSliceReader>::ReadAtFuture<'a>
The future returned by read_at
source§fn read_at(&mut self, offset: u64, len: usize) -> Self::ReadAtFuture<'_>
fn read_at(&mut self, offset: u64, len: usize) -> Self::ReadAtFuture<'_>
Read the entire buffer at the given position. Read more
§type LenFuture<'a> = <BytesMut as AsyncSliceReader>::LenFuture<'a>
type LenFuture<'a> = <BytesMut as AsyncSliceReader>::LenFuture<'a>
The future returned by len
source§impl AsyncSliceWriter for MutableMemFile
impl AsyncSliceWriter for MutableMemFile
§type WriteAtFuture<'a> = Ready<Result<(), Error>>
type WriteAtFuture<'a> = Ready<Result<(), Error>>
The future returned by write_at
source§fn write_at(&mut self, offset: u64, data: &[u8]) -> Self::WriteAtFuture<'_>
fn write_at(&mut self, offset: u64, data: &[u8]) -> Self::WriteAtFuture<'_>
Write the entire slice at the given position. Read more
§type WriteBytesAtFuture<'a> = Ready<Result<(), Error>>
type WriteBytesAtFuture<'a> = Ready<Result<(), Error>>
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 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.
§type SyncFuture<'a> = Ready<Result<(), Error>>
type SyncFuture<'a> = Ready<Result<(), Error>>
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.
source§impl Clone for MutableMemFile
impl Clone for MutableMemFile
source§fn clone(&self) -> MutableMemFile
fn clone(&self) -> MutableMemFile
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MutableMemFile
impl Debug for MutableMemFile
source§impl Default for MutableMemFile
impl Default for MutableMemFile
source§fn default() -> MutableMemFile
fn default() -> MutableMemFile
Returns the “default value” for a type. Read more
source§impl From<MutableMemFile> for MemFile
impl From<MutableMemFile> for MemFile
source§fn from(value: MutableMemFile) -> Self
fn from(value: MutableMemFile) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for MutableMemFile
impl Send for MutableMemFile
impl Sync for MutableMemFile
impl Unpin for MutableMemFile
impl UnwindSafe for MutableMemFile
Blanket Implementations§
source§impl<T> AsyncSliceReaderExt for Twhere
T: AsyncSliceReader,
impl<T> AsyncSliceReaderExt for Twhere
T: AsyncSliceReader,
source§fn read_to_end(&mut self) -> Self::ReadAtFuture<'_>
fn read_to_end(&mut self) -> Self::ReadAtFuture<'_>
Read the entire resource into a bytes::Bytes buffer, if possible.
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