pub struct Split<T> {
pub own: Vec<T>,
pub other: Vec<T>,
}Expand description
What a two-stream command writes, split by where each part lands.
The SPI is otherwise scoped to a single stream, and this is the one shape
that is not: an allocation is a move between two ledgers, so the events
that record it belong to two streams and either both land or neither may
(EventStore::append_if_many). Naming the two halves is what keeps
that from becoming a list the backend has to guess the routing of.
own is this store’s stream — the one it was opened on — and other is
the stream named at the call. Either may be empty: a refused allocation
writes the refusal on the parent and opens nothing.
The same shape carries the decision’s input
(EventStore::append_if_many): what it is shown from this stream, and
what it is shown from the other one. One name for both directions, because
the two streams are the same two streams either way.
Fields§
§own: Vec<T>What lands on this store’s own stream.
other: Vec<T>What lands on the other stream of the same database.
Implementations§
Trait Implementations§
impl<T: Eq> Eq for Split<T>
impl<T: PartialEq> StructuralPartialEq for Split<T>
Auto Trait Implementations§
impl<T> Freeze for Split<T>
impl<T> RefUnwindSafe for Split<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for Split<T>
impl<T> Sync for Split<T>
impl<T> Unpin for Split<T>
impl<T> UnsafeUnpin for Split<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for Split<T>where
Vec<T>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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