pub enum TicketEvent {
WinningTicket(Box<RedeemableTicket>),
RejectedTicket(Box<Ticket>, Option<Address>),
}Expand description
Ticket events emitted from the packet processing pipeline.
Variants§
WinningTicket(Box<RedeemableTicket>)
A winning ticket was received.
RejectedTicket(Box<Ticket>, Option<Address>)
A ticket has been rejected.
Implementations§
Source§impl TicketEvent
impl TicketEvent
Sourcepub const fn is_winning_ticket(&self) -> bool
pub const fn is_winning_ticket(&self) -> bool
Returns true if the enum is TicketEvent::WinningTicket otherwise false
Sourcepub const fn is_rejected_ticket(&self) -> bool
pub const fn is_rejected_ticket(&self) -> bool
Returns true if the enum is TicketEvent::RejectedTicket otherwise false
Source§impl TicketEvent
impl TicketEvent
pub fn try_as_winning_ticket(self) -> Option<Box<RedeemableTicket>>
pub const fn try_as_winning_ticket_ref(&self) -> Option<&Box<RedeemableTicket>>
pub fn try_as_winning_ticket_mut( &mut self, ) -> Option<&mut Box<RedeemableTicket>>
pub fn try_as_rejected_ticket(self) -> Option<(Box<Ticket>, Option<Address>)>
pub const fn try_as_rejected_ticket_ref( &self, ) -> Option<(&Box<Ticket>, &Option<Address>)>
pub fn try_as_rejected_ticket_mut( &mut self, ) -> Option<(&mut Box<Ticket>, &mut Option<Address>)>
Trait Implementations§
Source§impl Clone for TicketEvent
impl Clone for TicketEvent
Source§fn clone(&self) -> TicketEvent
fn clone(&self) -> TicketEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TicketEvent
impl RefUnwindSafe for TicketEvent
impl Send for TicketEvent
impl Sync for TicketEvent
impl Unpin for TicketEvent
impl UnwindSafe for TicketEvent
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more