pub struct BlockingSink<T: SyncProjectionSink> { /* private fields */ }Expand description
Adapter turning a SyncProjectionSink into a ProjectionSink.
Implementations§
Source§impl<T: SyncProjectionSink> BlockingSink<T>
impl<T: SyncProjectionSink> BlockingSink<T>
Sourcepub fn new(inner: T) -> Self
pub fn new(inner: T) -> Self
Wrap inner in spawn_blocking dispatch — the safe default for any
sink that may block.
Sourcepub fn inline(inner: T) -> Self
pub fn inline(inner: T) -> Self
Wrap inner in inline dispatch. Use only for fast in-memory sinks;
see Dispatch::Inline.
Trait Implementations§
Source§impl<T: SyncProjectionSink> ProjectionSink for BlockingSink<T>
impl<T: SyncProjectionSink> ProjectionSink for BlockingSink<T>
Source§fn commit<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
stream: &'life1 StreamId,
seq: Seq,
state: &'life2 Value,
event: &'life3 Event,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn commit<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
stream: &'life1 StreamId,
seq: Seq,
state: &'life2 Value,
event: &'life3 Event,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Apply a single committed event. Read more
Source§fn on_label_set<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
stream: &'life1 StreamId,
label: &'life2 Label,
at: Seq,
state: &'life3 Value,
event: &'life4 Event,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn on_label_set<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
stream: &'life1 StreamId,
label: &'life2 Label,
at: Seq,
state: &'life3 Value,
event: &'life4 Event,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
React to a label being pinned or moved. Read more
Source§fn on_label_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 StreamId,
label: &'life2 Label,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_label_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 StreamId,
label: &'life2 Label,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
React to a label being deleted. Read more
Auto Trait Implementations§
impl<T> Freeze for BlockingSink<T>
impl<T> RefUnwindSafe for BlockingSink<T>where
T: RefUnwindSafe,
impl<T> Send for BlockingSink<T>
impl<T> Sync for BlockingSink<T>
impl<T> Unpin for BlockingSink<T>
impl<T> UnsafeUnpin for BlockingSink<T>
impl<T> UnwindSafe for BlockingSink<T>where
T: RefUnwindSafe,
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