pub enum TicketSelector {
ChannelId(ChannelId),
IssuerAddress(ChainAddress),
RecipientAddress(ChainAddress),
Any,
}Expand description
Filters which ticket redemption events are delivered by a BlokliSubscriptionClient::subscribe_ticket_redeemed
subscription.
Pass one of the variants to receive only events matching that criterion, or TicketSelector::Any to receive all
events.
§Examples
ⓘ
use blokli_client::api::v1::{TicketSelector, ChannelId, ChainAddress};
// Subscribe to all redemptions in a specific channel
let by_channel = TicketSelector::ChannelId(channel_id);
// Subscribe to all redemptions where a specific node is the issuer
let by_issuer = TicketSelector::IssuerAddress(issuer_address);
// Subscribe to every redemption event regardless of channel or party
let any = TicketSelector::Any;Variants§
ChannelId(ChannelId)
Filter by channel id.
IssuerAddress(ChainAddress)
Filter by issuer (source node) address.
RecipientAddress(ChainAddress)
Filter by recipient (destination node) address.
Any
Matches any ticket redemption event.
Trait Implementations§
Source§impl Clone for TicketSelector
impl Clone for TicketSelector
Source§fn clone(&self) -> TicketSelector
fn clone(&self) -> TicketSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TicketSelector
impl Debug for TicketSelector
Source§impl From<TicketSelector> for TicketRedeemedVariables
impl From<TicketSelector> for TicketRedeemedVariables
Source§fn from(value: TicketSelector) -> Self
fn from(value: TicketSelector) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TicketSelector
impl RefUnwindSafe for TicketSelector
impl Send for TicketSelector
impl Sync for TicketSelector
impl Unpin for TicketSelector
impl UnsafeUnpin for TicketSelector
impl UnwindSafe for TicketSelector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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