Skip to main content

Requestable

Trait Requestable 

Source
pub trait Requestable:
    'static
    + Send
    + Sync
    + DeserializeOwned
    + Debug
    + Clone
    + Eq {
    type Identifier: Clone + Eq + Hash + Display + Sync + Debug;
    type URL: RequestURL;

    // Required methods
    fn id(&self) -> &Self::Identifier;
    fn url_for_id(id: &Self::Identifier) -> Self::URL;
    fn get_entries(
        response: <Self::URL as RequestURL>::Response,
    ) -> impl IntoIterator<Item = Self>
       where Self: Sized;
    fn get_cache_table() -> &'static RwLock<CacheTable<Self>>
       where Self: Sized;
}

Required Associated Types§

Required Methods§

Source

fn id(&self) -> &Self::Identifier

Source

fn url_for_id(id: &Self::Identifier) -> Self::URL

Source

fn get_entries( response: <Self::URL as RequestURL>::Response, ) -> impl IntoIterator<Item = Self>
where Self: Sized,

Source

fn get_cache_table() -> &'static RwLock<CacheTable<Self>>
where Self: Sized,

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.

Implementors§

Source§

impl Requestable for GameType

Source§

impl Requestable for HitTrajectory

Source§

impl Requestable for Person<()>

Source§

impl Requestable for RosterType

Source§

impl Requestable for StatGroup

Source§

impl Requestable for Award

Source§

impl Requestable for BaseballStat

Source§

impl Requestable for Conference

Source§

impl Requestable for Division

Source§

impl Requestable for EventType

Source§

impl Requestable for GameStatus

Source§

impl Requestable for JobType

Source§

impl Requestable for Language

Source§

impl Requestable for League

Source§

impl Requestable for Metric

Source§

impl Requestable for PitchCode

Source§

impl Requestable for PitchType

Source§

impl Requestable for Platform

Source§

impl Requestable for Position

Source§

impl Requestable for ReviewReason

Source§

impl Requestable for ScheduleEventType

Source§

impl Requestable for SituationCode

Source§

impl Requestable for SkyDescription

Source§

impl Requestable for Sport

Source§

impl Requestable for StandingsType

Source§

impl Requestable for StatType

Source§

impl Requestable for UniformAsset

Source§

impl Requestable for Venue

Source§

impl Requestable for WindDirection