Skip to main content

Load

Trait Load 

Source
pub trait Load<A>: Send
where A: AggregateRoot,
{ // Required method fn load( &self, id: &<A as Entity>::Id, ) -> impl Future<Output = Result<Option<A>, PortError>> + Send; }
Expand description

Loads an aggregate by id.

Required Methods§

Source

fn load( &self, id: &<A as Entity>::Id, ) -> impl Future<Output = Result<Option<A>, PortError>> + Send

Returns the aggregate with the given id, or None if it doesn’t exist.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A> Load<A> for InMemoryStore<A>
where A: AggregateRoot + Clone,