Skip to main content

HasTicketManagement

Trait HasTicketManagement 

pub trait HasTicketManagement {
    type TicketManager: TicketManagement + Clone + Send + Sync + 'static;

    // Required methods
    fn ticket_management(&self) -> &Self::TicketManager;
    fn subscribe_ticket_events(
        &self,
    ) -> impl Stream<Item = TicketEvent> + Send + 'static;
    fn status(&self) -> ComponentStatus;
}
Expand description

Provides access to the ticket management component.

Only available on relay nodes that process tickets.

Required Associated Types§

type TicketManager: TicketManagement + Clone + Send + Sync + 'static

The concrete TicketManagement implementation.

Required Methods§

fn ticket_management(&self) -> &Self::TicketManager

Returns a reference to the ticket manager.

fn subscribe_ticket_events( &self, ) -> impl Stream<Item = TicketEvent> + Send + 'static

Returns a stream of TicketEvents from the transport layer.

fn status(&self) -> ComponentStatus

Reports the current health of the ticket management component.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<'a, T> HasTicketManagement for &'a T
where T: 'a + HasTicketManagement + ?Sized,

§

impl<T> HasTicketManagement for Arc<T>

Implementors§

Source§

impl<Chain, Graph, Net, TMgr> HasTicketManagement for Hopr<Chain, Graph, Net, TMgr>
where Chain: HoprChainApi + Clone + Send + Sync + 'static, TMgr: TicketManagement + Clone + Send + Sync + 'static,