mlb_api/
lib.rs

1pub mod endpoints;
2pub mod request;
3pub mod types;
4mod cache;
5
6#[cfg(feature = "reqwest")]
7pub(crate) type RwLock<T> = tokio::sync::RwLock<T>;
8
9#[cfg(feature = "reqwest")]
10pub(crate) const fn rwlock_const_new<T>(t: T) -> RwLock<T> {
11    RwLock::const_new(t)
12}
13
14#[cfg(feature = "ureq")]
15pub(crate) type RwLock<T> = parking_lot::RwLock<T>;
16
17#[cfg(feature = "ureq")]
18pub(crate) const fn rwlock_const_new<T>(t: T) -> RwLock<T> {
19    parking_lot::const_rwlock(t)
20}