pub struct RedisJournal { /* private fields */ }Implementations§
Source§impl RedisJournal
impl RedisJournal
Sourcepub async fn connect(cfg: RedisConfig) -> Result<Arc<Self>, JournalError>
pub async fn connect(cfg: RedisConfig) -> Result<Arc<Self>, JournalError>
Connect to Redis using cfg.url and return a ready journal.
pub fn from_pool(pool: Pool, cfg: RedisConfig) -> Arc<Self>
pub fn config(&self) -> &RedisConfig
pub fn client(&self) -> &Pool
Trait Implementations§
Source§impl Journal for RedisJournal
impl Journal for RedisJournal
fn write_messages<'life0, 'async_trait>(
&'life0 self,
messages: Vec<PersistentRepr>,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_messages_to<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
to_sequence_nr: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replay_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from: u64,
to: u64,
max: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersistentRepr>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn highest_sequence_nr<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
_from: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn events_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
from_offset: u64,
max: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersistentRepr>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Distinct persistence ids known to the backend. Default impl
returns empty so backends without an id index opt in.
Auto Trait Implementations§
impl Freeze for RedisJournal
impl !RefUnwindSafe for RedisJournal
impl Send for RedisJournal
impl Sync for RedisJournal
impl Unpin for RedisJournal
impl UnsafeUnpin for RedisJournal
impl !UnwindSafe for RedisJournal
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more