pub enum ReceivedRequestHandle<F: Format> {
GreetCashier(ReceivedRequestHandle<F>, String),
BuyTomatoes(ReceivedRequestHandle<F>, BuyTomatoesRequest),
}Expand description
Enum for all possible incoming requests of the Supermarket interface.
Variants§
GreetCashier(ReceivedRequestHandle<F>, String)
Greet the cashier.
The cashier will reply with their own greeting.
BuyTomatoes(ReceivedRequestHandle<F>, BuyTomatoesRequest)
Purchase tomatoes.
The response of the cashier depends on the update messages exchanged.
If you run away after they have sent the price, or if you pay with a nun-fungable token,
they will respond with BuyTomatoesResponse::ICalledSecurity.
If you pay with the correct amount, they will respond with BuyTomatoesResponse::ThankYouComeAgain.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for ReceivedRequestHandle<F>
impl<F> RefUnwindSafe for ReceivedRequestHandle<F>
impl<F> Send for ReceivedRequestHandle<F>
impl<F> Sync for ReceivedRequestHandle<F>
impl<F> Unpin for ReceivedRequestHandle<F>
impl<F> UnsafeUnpin for ReceivedRequestHandle<F>
impl<F> UnwindSafe for ReceivedRequestHandle<F>
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