pub struct DmaStorage { /* private fields */ }
Implementations§
source§impl DmaStorage
impl DmaStorage
pub async fn new<P: AsRef<Path>>(path: P) -> Result<Self, DmaStorageError>
pub async fn with_storage_path_and_buffer_size<P: AsRef<Path>>( path: P, buffer_size: usize ) -> Result<Self, DmaStorageError>
Trait Implementations§
source§impl AsyncConsume for DmaStorage
impl AsyncConsume for DmaStorage
§type ConsumeError = DmaStorageError
type ConsumeError = DmaStorageError
Error that can occur during a consumption operation.
source§impl AsyncTruncate for DmaStorage
impl AsyncTruncate for DmaStorage
§type TruncError = DmaStorageError
type TruncError = DmaStorageError
Error that can occur during a truncation operation.
source§fn truncate<'life0, 'life1, 'async_trait>(
&'life0 mut self,
position: &'life1 Self::Mark
) -> Pin<Box<dyn Future<Output = Result<(), Self::TruncError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn truncate<'life0, 'life1, 'async_trait>( &'life0 mut self, position: &'life1 Self::Mark ) -> Pin<Box<dyn Future<Output = Result<(), Self::TruncError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Truncates this collection after the given mark, such that this collection
contains records only upto this “mark”.
source§impl Debug for DmaStorage
impl Debug for DmaStorage
source§impl PathAddressedStorageProvider<DmaStorage> for DmaStorageProvider
impl PathAddressedStorageProvider<DmaStorage> for DmaStorageProvider
fn obtain_storage<'life0, 'async_trait, P>( &'life0 self, path: P ) -> Pin<Box<dyn Future<Output = Result<DmaStorage, DmaStorageError>> + 'async_trait>>where P: 'async_trait + AsRef<Path>, Self: 'async_trait, 'life0: 'async_trait,
source§impl Sizable for DmaStorage
impl Sizable for DmaStorage
source§impl Storage for DmaStorage
impl Storage for DmaStorage
§type Error = DmaStorageError
type Error = DmaStorageError
Error that can occur during storage operations.
source§fn append_slice<'life0, 'life1, 'async_trait>(
&'life0 mut self,
slice: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<(Self::Position, Self::Size), Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_slice<'life0, 'life1, 'async_trait>( &'life0 mut self, slice: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<(Self::Position, Self::Size), Self::Error>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Appends the given slice of bytes to the end of this storage. Read more
source§fn read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
position: &'life1 Self::Position,
size: &'life2 Self::Size
) -> Pin<Box<dyn Future<Output = Result<Self::Content, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, position: &'life1 Self::Position, size: &'life2 Self::Size ) -> Pin<Box<dyn Future<Output = Result<Self::Content, Self::Error>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
source§fn append<'life0, 'life1, 'async_trait, XBuf, XE, X>(
&'life0 mut self,
buf_stream: &'life1 mut X,
append_threshold: Option<Self::Size>
) -> Pin<Box<dyn Future<Output = Result<(Self::Position, Self::Size), Self::Error>> + 'async_trait>>where
XBuf: Deref<Target = [u8]> + 'async_trait,
X: Stream<Item = Result<XBuf, XE>> + Unpin + 'async_trait,
XE: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait, XBuf, XE, X>( &'life0 mut self, buf_stream: &'life1 mut X, append_threshold: Option<Self::Size> ) -> Pin<Box<dyn Future<Output = Result<(Self::Position, Self::Size), Self::Error>> + 'async_trait>>where XBuf: Deref<Target = [u8]> + 'async_trait, X: Stream<Item = Result<XBuf, XE>> + Unpin + 'async_trait, XE: 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Appends a stream of byte slices to the end of this storage. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DmaStorage
impl !Send for DmaStorage
impl !Sync for DmaStorage
impl Unpin for DmaStorage
impl !UnwindSafe for DmaStorage
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