Struct eventsourced::EntityRef
source · pub struct EntityRef<E>where
E: EventSourced,{ /* private fields */ }Expand description
A handle for a spawned event sourced entity which can be used to invoke its command handler.
Implementations§
source§impl<E> EntityRef<E>where
E: EventSourced,
impl<E> EntityRef<E>where
E: EventSourced,
sourcepub async fn handle_cmd(&self, cmd: E::Cmd) -> Result<(), HandleCmdError<E>>
pub async fn handle_cmd(&self, cmd: E::Cmd) -> Result<(), HandleCmdError<E>>
Invoke the command handler of the entity.
Trait Implementations§
Auto Trait Implementations§
impl<E> !RefUnwindSafe for EntityRef<E>
impl<E> Send for EntityRef<E>
impl<E> Sync for EntityRef<E>
impl<E> Unpin for EntityRef<E>
impl<E> !UnwindSafe for EntityRef<E>
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
Mutably borrows from an owned value. Read more