pub struct StreamIdentity { /* private fields */ }Expand description
Stable event-stream identity used by persistence backends.
Durable stores should key aggregate streams by both aggregate type and aggregate id. ID-only repository APIs remain available for the synchronous in-memory path, but production adapters should prefer this type.
Implementations§
Source§impl StreamIdentity
impl StreamIdentity
Sourcepub fn new(
aggregate_type: impl Into<String>,
aggregate_id: impl Into<String>,
) -> Result<Self, RepositoryError>
pub fn new( aggregate_type: impl Into<String>, aggregate_id: impl Into<String>, ) -> Result<Self, RepositoryError>
Create a validated stream identity.
Sourcepub fn aggregate_type(&self) -> &str
pub fn aggregate_type(&self) -> &str
Stable aggregate type component.
Sourcepub fn aggregate_id(&self) -> &str
pub fn aggregate_id(&self) -> &str
Aggregate id component.
Trait Implementations§
Source§impl Clone for StreamIdentity
impl Clone for StreamIdentity
Source§fn clone(&self) -> StreamIdentity
fn clone(&self) -> StreamIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamIdentity
impl Debug for StreamIdentity
Source§impl Display for StreamIdentity
impl Display for StreamIdentity
impl Eq for StreamIdentity
Source§impl Hash for StreamIdentity
impl Hash for StreamIdentity
Source§impl PartialEq for StreamIdentity
impl PartialEq for StreamIdentity
Source§fn eq(&self, other: &StreamIdentity) -> bool
fn eq(&self, other: &StreamIdentity) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamIdentity
Auto Trait Implementations§
impl Freeze for StreamIdentity
impl RefUnwindSafe for StreamIdentity
impl Send for StreamIdentity
impl Sync for StreamIdentity
impl Unpin for StreamIdentity
impl UnsafeUnpin for StreamIdentity
impl UnwindSafe for StreamIdentity
Blanket Implementations§
Source§impl<T> AggregateBuilder for T
impl<T> AggregateBuilder for T
fn aggregate<A: Aggregate>(self) -> AggregateRepository<Self, A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Queueable for T
impl<T> Queueable for T
Source§fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
Wrap with the default async lock manager. Pair with
.aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_with<L: AsyncLockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_with<L: AsyncLockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.