pub struct EventStoreBuilder { /* private fields */ }
Expand description
Builder type for EventStore
and EventSubscriber
types.
The same builder instance can be used to build multiple instances of EventStore
and EventSubscriber
.
Implementations§
Source§impl EventStoreBuilder
impl EventStoreBuilder
Sourcepub fn new(client: Client) -> Self
pub fn new(client: Client) -> Self
Creates a new builder instance using the specified Redis client.
Sourcepub fn stream_page_size(self, size: usize) -> Self
pub fn stream_page_size(self, size: usize) -> Self
Changes the page size used by the Stream
returned in EventStore::stream
and EventStore::stream_all
.
Sourcepub async fn build_store<Id, Event>(
&self,
stream_name: &'static str,
) -> RedisResult<EventStore<Id, Event>>
pub async fn build_store<Id, Event>( &self, stream_name: &'static str, ) -> RedisResult<EventStore<Id, Event>>
Builds a new EventStore
instance.
This method returns an std::future::Future
completing after a
connection with Redis is successfully established.
Sourcepub fn build_subscriber<Id, Event>(
&self,
stream_name: &'static str,
) -> EventSubscriber<Id, Event>
pub fn build_subscriber<Id, Event>( &self, stream_name: &'static str, ) -> EventSubscriber<Id, Event>
Builds a new EventSubscriber
instance.
Trait Implementations§
Source§impl Clone for EventStoreBuilder
impl Clone for EventStoreBuilder
Source§fn clone(&self) -> EventStoreBuilder
fn clone(&self) -> EventStoreBuilder
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 moreAuto Trait Implementations§
impl Freeze for EventStoreBuilder
impl RefUnwindSafe for EventStoreBuilder
impl Send for EventStoreBuilder
impl Sync for EventStoreBuilder
impl Unpin for EventStoreBuilder
impl UnwindSafe for EventStoreBuilder
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