pub struct DmaStorage { /* private fields */ }

Implementations§

source§

impl DmaStorage

source

pub async fn new<P: AsRef<Path>>(path: P) -> Result<Self, DmaStorageError>

source

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

§

type ConsumeError = DmaStorageError

Error that can occur during a consumption operation.
source§

fn remove<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Self::ConsumeError>> + 'async_trait>>where Self: 'async_trait,

Removes all storage associated with this collection. Read more
source§

fn close<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Self::ConsumeError>> + 'async_trait>>where Self: 'async_trait,

Closes this collection. Read more
source§

impl AsyncTruncate for DmaStorage

§

type Mark = u64

Type to denote a truncation “mark”, after which the collection will be truncated.
§

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,

Truncates this collection after the given mark, such that this collection contains records only upto this “mark”.
source§

impl Debug for DmaStorage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PathAddressedStorageProvider<DmaStorage> for DmaStorageProvider

source§

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

§

type Size = u64

Type to represent the size of this collection in number of bytes.
source§

fn size(&self) -> Self::Size

Returns the size of this collection in butes.
source§

impl Storage for DmaStorage

§

type Content = ReadResult

Type to represent the content bytes of this storage media.
§

type Position = u64

Type to represent data positions inside this storage media.
§

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,

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,

Reads size number of bytes from the given position. Read more
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,

Appends a stream of byte slices to the end of this storage. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more