pub enum CommandEffect<E, Reply, Error>where
E: EventSourced,{
EmitAndReply(E::Event, Box<dyn FnOnce(&E) -> Reply + Send + Sync>),
Reply(Reply),
Reject(Error),
}Expand description
The result of handling a command, either emitting an event and replying or rejecting the command.
Variants§
Implementations§
Source§impl<E, Reply, Error> CommandEffect<E, Reply, Error>where
E: EventSourced,
impl<E, Reply, Error> CommandEffect<E, Reply, Error>where
E: EventSourced,
Source§impl<E, Error> CommandEffect<E, (), Error>where
E: EventSourced,
impl<E, Error> CommandEffect<E, (), Error>where
E: EventSourced,
Auto Trait Implementations§
impl<E, Reply, Error> Freeze for CommandEffect<E, Reply, Error>
impl<E, Reply, Error> !RefUnwindSafe for CommandEffect<E, Reply, Error>
impl<E, Reply, Error> Send for CommandEffect<E, Reply, Error>
impl<E, Reply, Error> Sync for CommandEffect<E, Reply, Error>
impl<E, Reply, Error> Unpin for CommandEffect<E, Reply, Error>
impl<E, Reply, Error> !UnwindSafe for CommandEffect<E, Reply, Error>
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