pub struct EventSlugFilter { /* private fields */ }Expand description
Filter that provides event slugs, optionally via a dynamic closure.
Implementations§
Source§impl EventSlugFilter
impl EventSlugFilter
Sourcepub fn new<F: Fn() -> Vec<String> + Send + Sync + 'static>(slug_fn: F) -> Self
pub fn new<F: Fn() -> Vec<String> + Send + Sync + 'static>(slug_fn: F) -> Self
Creates a new EventSlugFilter from a closure that generates slugs.
The closure is re-evaluated on each load_all() call, enabling
time-based or stateful slug generation.
Sourcepub fn from_slugs(slugs: Vec<String>) -> Self
pub fn from_slugs(slugs: Vec<String>) -> Self
Creates a new EventSlugFilter from a static list of event slugs.
Trait Implementations§
Source§impl Debug for EventSlugFilter
impl Debug for EventSlugFilter
Source§impl InstrumentFilter for EventSlugFilter
impl InstrumentFilter for EventSlugFilter
Source§fn event_slugs(&self) -> Option<Vec<String>>
fn event_slugs(&self) -> Option<Vec<String>>
Event slugs for fetching event containers via
GET /events?slug=.
Each event returns multiple markets.Source§fn market_slugs(&self) -> Option<Vec<String>>
fn market_slugs(&self) -> Option<Vec<String>>
Market slugs for concurrent per-slug fetching via
GET /markets?slug=.Source§fn query_params(&self) -> Option<GetGammaMarketsParams>
fn query_params(&self) -> Option<GetGammaMarketsParams>
Gamma API query params for bulk filtered fetching.
Source§fn event_queries(&self) -> Option<Vec<(String, GetGammaMarketsParams)>>
fn event_queries(&self) -> Option<Vec<(String, GetGammaMarketsParams)>>
Event queries with client-side sorting and limiting of embedded markets. Read more
Source§fn event_params(&self) -> Option<GetGammaEventsParams>
fn event_params(&self) -> Option<GetGammaEventsParams>
Gamma events API query params for fetching events with full filtering.
Source§fn search_params(&self) -> Option<GetSearchParams>
fn search_params(&self) -> Option<GetSearchParams>
Public search API params for text-based instrument discovery.
Source§fn accept(&self, instrument: &InstrumentAny) -> bool
fn accept(&self, instrument: &InstrumentAny) -> bool
Post-fetch predicate: only instruments where this returns
true are kept.
Default accepts all instruments. Override to refine results after fetching.Source§fn accept_new_market(&self, new_market: &PolymarketNewMarket) -> bool
fn accept_new_market(&self, new_market: &PolymarketNewMarket) -> bool
Pre-fetch gate for new market WS events: returns
true if the market
should proceed to Gamma HTTP fetch. Used when this filter is set as
the dedicated new_market_filter in the data client config.
Default accepts all new markets.Auto Trait Implementations§
impl !RefUnwindSafe for EventSlugFilter
impl !UnwindSafe for EventSlugFilter
impl Freeze for EventSlugFilter
impl Send for EventSlugFilter
impl Sync for EventSlugFilter
impl Unpin for EventSlugFilter
impl UnsafeUnpin for EventSlugFilter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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