pub struct EventQueryFilter { /* private fields */ }Expand description
Event filter that sorts and limits an event’s embedded markets client-side.
Only order, ascending, and max_markets are supported. Other parameters
and unsupported order fields cause an error when loading. See
PolymarketGammaHttpClient::request_instruments_by_event_query
for supported order fields. EventSlugFilter returns all markets from the event.
Implementations§
Source§impl EventQueryFilter
impl EventQueryFilter
Sourcepub fn new(event_slug: impl Into<String>, params: GetGammaMarketsParams) -> Self
pub fn new(event_slug: impl Into<String>, params: GetGammaMarketsParams) -> Self
Creates a new EventQueryFilter for a single event slug with query params.
Sourcepub fn from_queries(queries: Vec<(String, GetGammaMarketsParams)>) -> Self
pub fn from_queries(queries: Vec<(String, GetGammaMarketsParams)>) -> Self
Creates a new EventQueryFilter from multiple event slug + params pairs.
Trait Implementations§
Source§impl Clone for EventQueryFilter
impl Clone for EventQueryFilter
Source§impl Debug for EventQueryFilter
impl Debug for EventQueryFilter
Source§impl InstrumentFilter for EventQueryFilter
impl InstrumentFilter for EventQueryFilter
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 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 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 query_params(&self) -> Option<GetGammaMarketsParams>
fn query_params(&self) -> Option<GetGammaMarketsParams>
Gamma API query params for bulk filtered fetching.
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 Freeze for EventQueryFilter
impl RefUnwindSafe for EventQueryFilter
impl Send for EventQueryFilter
impl Sync for EventQueryFilter
impl Unpin for EventQueryFilter
impl UnsafeUnpin for EventQueryFilter
impl UnwindSafe for EventQueryFilter
Blanket Implementations§
impl<T> Allocation for T
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,
§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