Trait engula_kernel::Journal[][src]

pub trait Journal: 'static + Clone + Send + Sync {
    type Stream: Stream;
    fn stream<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Self::Stream, Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn create_stream<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Self::Stream, Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_stream<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

An interface to manipulate a journal.

Associated Types

Required methods

Returns a stream.

Creates a stream.

Errors

Returns Error::AlreadyExists if the stream already exists.

Deletes a stream.

Using a deleted stream is an undefined behavior.

Errors

Returns Error::NotFound if the stream doesn’t exist.

Implementations on Foreign Types

Implementors