mlb_api/endpoints/
links.rs

1use std::fmt::Display;
2use serde::de::DeserializeOwned;
3use crate::request;
4
5pub trait Url<T: DeserializeOwned>: Display {
6    #[cfg(feature = "ureq")]
7    fn get(&self) -> request::Result<T> where Self: Sized {
8        request::get(self)
9    }
10
11    #[cfg(feature = "reqwest")]
12    fn get(&self) -> impl Future<Output = request::Result<T>> where Self: Sized {
13        request::get(self)
14    }
15}