pub struct NStreamsHandler<S, R> { /* private fields */ }Expand description
Coordinates read-side subscriptions with history replay and live tailing.
Implementations§
Source§impl<S, R> NStreamsHandler<S, R>where
S: EventStore + 'static,
R: ReadStreamBackend + 'static,
impl<S, R> NStreamsHandler<S, R>where
S: EventStore + 'static,
R: ReadStreamBackend + 'static,
pub fn new(store: S, read_stream: R) -> Self
pub fn with_max_event_bytes( store: S, read_stream: R, max_event_bytes: u64, ) -> Self
Sourcepub async fn subscribe<N: Namespace>(
&self,
namespace: &N,
history_count: u64,
) -> Result<Subscription>
pub async fn subscribe<N: Namespace>( &self, namespace: &N, history_count: u64, ) -> Result<Subscription>
Subscribe to a namespace, replaying up to history_count events before live tail.
pub async fn is_read_stream_ready<N: Namespace>(&self, namespace: &N) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<S, R> !RefUnwindSafe for NStreamsHandler<S, R>
impl<S, R> !UnwindSafe for NStreamsHandler<S, R>
impl<S, R> Freeze for NStreamsHandler<S, R>
impl<S, R> Send for NStreamsHandler<S, R>
impl<S, R> Sync for NStreamsHandler<S, R>
impl<S, R> Unpin for NStreamsHandler<S, R>
impl<S, R> UnsafeUnpin for NStreamsHandler<S, R>
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