[−][src]Struct cqrs::Entity
An identified, specific instance of a hydrated aggregate.
Methods
impl<I, A> Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
pub fn new(id: I, aggregate: HydratedAggregate<A>) -> Self
[src]
Creates a new entity from an identifier and an associated hydrated aggregate.
pub fn id(&self) -> &I
[src]
The entity's identifier.
pub fn aggregate(&self) -> &HydratedAggregate<A>
[src]
An immutable reference to the underlying aggregate.
pub fn aggregate_mut(&mut self) -> &mut HydratedAggregate<A>
[src]
A mutable reference to the underlying aggregate.
Trait Implementations
impl<I: Clone, A: Clone> Clone for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
fn clone(&self) -> Entity<I, A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<I: Default, A: Default> Default for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
impl<I: PartialEq, A: PartialEq> PartialEq<Entity<I, A>> for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
impl<I: Copy, A: Copy> Copy for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
impl<I: Eq, A: Eq> Eq for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
impl<I: Debug, A: Debug> Debug for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
impl<I: Hash, A: Hash> Hash for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
fn hash<__HIA: Hasher>(&self, state: &mut __HIA)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<I, A> Borrow<A> for Entity<I, A> where
A: Aggregate,
I: AggregateId<A>,
[src]
A: Aggregate,
I: AggregateId<A>,
Auto Trait Implementations
impl<I, A> Sync for Entity<I, A> where
A: Sync,
I: Sync,
A: Sync,
I: Sync,
impl<I, A> Send for Entity<I, A> where
A: Send,
I: Send,
A: Send,
I: Send,
impl<I, A> Unpin for Entity<I, A> where
A: Unpin,
I: Unpin,
A: Unpin,
I: Unpin,
impl<I, A> RefUnwindSafe for Entity<I, A> where
A: RefUnwindSafe,
I: RefUnwindSafe,
A: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, A> UnwindSafe for Entity<I, A> where
A: UnwindSafe,
I: UnwindSafe,
A: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, V> SliceConcat<T> for V where
T: Clone,
V: Borrow<[T]>,
[src]
T: Clone,
V: Borrow<[T]>,
type Output = Vec<T>
🔬 This is a nightly-only experimental API. (
slice_concat_trait
)The resulting type after concatenation
fn concat(slice: &[V]) -> Vec<T>
[src]
fn join(slice: &[V], sep: &T) -> Vec<T>
[src]
impl<S> SliceConcat<str> for S where
S: Borrow<str>,
[src]
S: Borrow<str>,
type Output = String
🔬 This is a nightly-only experimental API. (
slice_concat_trait
)The resulting type after concatenation
fn concat(slice: &[S]) -> String
[src]
fn join(slice: &[S], sep: &str) -> String
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,