Skip to main content

MemoryIngestHandle

Struct MemoryIngestHandle 

Source
pub struct MemoryIngestHandle { /* private fields */ }
Expand description

One handle onto a MemoryIngestFixture’s store.

A type of its own because the orphan rule refuses impl EventStore for Arc<MemoryIngestStore> in this crate: both the trait and Arc are foreign, and Arc is not #[fundamental]. Arc because the store is Send + Sync and the handle keeps it so, which is what lets it run under the tokio emitter.

Trait Implementations§

Source§

impl Clone for MemoryIngestHandle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryIngestHandle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SendEventStore for MemoryIngestHandle

Source§

type Error = MemoryStoreError

How this adapter fails for its own reasons. Read more
Source§

fn read( &self, query: &Query, options: ReadOptions, ) -> impl Stream<Item = Result<SequencedEvent, Self::Error>> + Send

Reads the events matching query, in the order options asks for. Read more
Source§

async fn append( &self, events: &[Event], condition: Option<&AppendCondition>, ) -> Result<SequencePosition, AppendError<Self::Error>>

Atomically appends events, rejecting the write if condition matches. Read more
Source§

async fn head(&self) -> Result<Option<SequencePosition>, Self::Error>

The highest position currently visible in the store, or None when it holds nothing. Read more
Source§

async fn contains_event_id(&self, id: EventId) -> Result<bool, Self::Error>

Whether this store holds an event with id. Read more
Source§

impl SendIngestStore for MemoryIngestHandle

Source§

type Error = MemoryStoreError

How this store fails, stating a class so a runner never infers one.
Source§

async fn store_id(&self) -> Result<StoreId, Self::Error>

This store’s own incarnation identifier. Read more
Source§

async fn ingest( &self, groups: &[IngestGroup<'_>], ) -> Result<Ingested, IngestError<Self::Error>>

Records events other stores minted, preserving their identity, together with any compensation this side writes for them. Read more
Source§

async fn watermark(&self) -> Result<Watermark, Self::Error>

The highest origin position this store holds from each origin store. Read more
Source§

impl SendWriteGroupStore for MemoryIngestHandle

Source§

type Error = GroupOrderError

How this store fails, stating a class so a runner never infers one.
Source§

async fn read_groups( &self, after: Option<SequencePosition>, max_events: NonZeroUsize, ) -> Result<GroupPage, Self::Error>

The write groups whose first position is above after (every group when None), in ascending first order, each whole. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<TraitVariantBlanketType> EventStore for TraitVariantBlanketType
where TraitVariantBlanketType: SendEventStore,

Source§

type Error = <TraitVariantBlanketType as SendEventStore>::Error

How this adapter fails for its own reasons. Read more
Source§

fn read( &self, query: &Query, options: ReadOptions, ) -> impl Stream<Item = Result<SequencedEvent, <TraitVariantBlanketType as EventStore>::Error>>

Reads the events matching query, in the order options asks for. Read more
Source§

async fn append( &self, events: &[Event], condition: Option<&AppendCondition>, ) -> Result<SequencePosition, AppendError<<TraitVariantBlanketType as EventStore>::Error>>

Atomically appends events, rejecting the write if condition matches. Read more
Source§

async fn head( &self, ) -> Result<Option<SequencePosition>, <TraitVariantBlanketType as EventStore>::Error>

The highest position currently visible in the store, or None when it holds nothing. Read more
Source§

async fn contains_event_id( &self, id: EventId, ) -> Result<bool, <TraitVariantBlanketType as EventStore>::Error>

Whether this store holds an event with id. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<TraitVariantBlanketType> IngestStore for TraitVariantBlanketType
where TraitVariantBlanketType: SendIngestStore,

§

type Error = <TraitVariantBlanketType as SendIngestStore>::Error

How this store fails, stating a class so a runner never infers one.
§

async fn store_id( &self, ) -> Result<StoreId, <TraitVariantBlanketType as IngestStore>::Error>

This store’s own incarnation identifier. Read more
§

async fn ingest( &self, groups: &[IngestGroup<'_>], ) -> Result<Ingested, IngestError<<TraitVariantBlanketType as IngestStore>::Error>>

Records events other stores minted, preserving their identity, together with any compensation this side writes for them. Read more
§

async fn watermark( &self, ) -> Result<Watermark, <TraitVariantBlanketType as IngestStore>::Error>

The highest origin position this store holds from each origin store. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<TraitVariantBlanketType> WriteGroupStore for TraitVariantBlanketType
where TraitVariantBlanketType: SendWriteGroupStore,

§

type Error = <TraitVariantBlanketType as SendWriteGroupStore>::Error

How this store fails, stating a class so a runner never infers one.
§

async fn read_groups( &self, after: Option<SequencePosition>, max_events: NonZero<usize>, ) -> Result<GroupPage, <TraitVariantBlanketType as WriteGroupStore>::Error>

The write groups whose first position is above after (every group when None), in ascending first order, each whole. Read more