Struct gift_shop::commands::CreateGiftCard
source · pub struct CreateGiftCard {
pub gift_card_id: Uuid,
pub name: String,
pub price: i64,
pub count: usize,
}
Fields§
§gift_card_id: Uuid
§name: String
§price: i64
§count: usize
Trait Implementations§
source§impl Command for CreateGiftCard
impl Command for CreateGiftCard
§type Event = GiftCardCreated
type Event = GiftCardCreated
The Event that can be generated for this command
§type Executor = GiftCard
type Executor = GiftCard
The Executor that will execute the command and produce the events Read more
§type ExecutorRegistry = AggregateInstanceRegistry<GiftCard>
type ExecutorRegistry = AggregateInstanceRegistry<GiftCard>
The registry where the command will be dispatched
type CommandHandler = NoHandler
source§fn identifier(&self) -> String
fn identifier(&self) -> String
Returns the identifier for this command. Read more
source§impl CommandExecutor<CreateGiftCard> for GiftCard
impl CommandExecutor<CreateGiftCard> for GiftCard
fn execute( cmd: CreateGiftCard, state: &Self ) -> ExecutionResult<GiftCardCreated>
source§impl<'de> Deserialize<'de> for CreateGiftCard
impl<'de> Deserialize<'de> for CreateGiftCard
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<CreateGiftCardPayload> for CreateGiftCard
impl From<CreateGiftCardPayload> for CreateGiftCard
source§fn from(payload: CreateGiftCardPayload) -> Self
fn from(payload: CreateGiftCardPayload) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for CreateGiftCard
impl Send for CreateGiftCard
impl Sync for CreateGiftCard
impl Unpin for CreateGiftCard
impl UnwindSafe for CreateGiftCard
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