pub struct TicketAggregationActions<T, U> {
pub queue: Sender<TicketAggregationToProcess<T, U>>,
}
Expand description
External API for feeding Ticket Aggregation actions into the Ticket Aggregation processor processing the elements independently in the background.
Fields§
§queue: Sender<TicketAggregationToProcess<T, U>>
Implementations§
Source§impl<T, U> TicketAggregationActions<T, U>
impl<T, U> TicketAggregationActions<T, U>
Sourcepub fn receive_ticket(
&mut self,
source: PeerId,
ticket: Result<Ticket, String>,
request: U,
) -> Result<()>
pub fn receive_ticket( &mut self, source: PeerId, ticket: Result<Ticket, String>, request: U, ) -> Result<()>
Pushes the aggregated ticket received from the transport layer into processing.
Sourcepub fn receive_aggregation_request(
&mut self,
source: PeerId,
tickets: Vec<TransferableWinningTicket>,
request: T,
) -> Result<()>
pub fn receive_aggregation_request( &mut self, source: PeerId, tickets: Vec<TransferableWinningTicket>, request: T, ) -> Result<()>
Process the received aggregation request
Sourcepub fn aggregate_tickets(
&mut self,
channel: &Hash,
prerequisites: AggregationPrerequisites,
) -> Result<TicketAggregationAwaiter>
pub fn aggregate_tickets( &mut self, channel: &Hash, prerequisites: AggregationPrerequisites, ) -> Result<TicketAggregationAwaiter>
Pushes a new collection of tickets into the processing.
Trait Implementations§
Source§impl<T, U> Clone for TicketAggregationActions<T, U>
impl<T, U> Clone for TicketAggregationActions<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for TicketAggregationActions<T, U>
impl<T, U> !RefUnwindSafe for TicketAggregationActions<T, U>
impl<T, U> Send for TicketAggregationActions<T, U>
impl<T, U> Sync for TicketAggregationActions<T, U>
impl<T, U> Unpin for TicketAggregationActions<T, U>
impl<T, U> !UnwindSafe for TicketAggregationActions<T, U>
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