pub trait DDnetApi {
// Required methods
fn master(&self) -> impl Future<Output = Result<Master, ApiError>> + Send;
fn skins(&self) -> impl Future<Output = Result<DDSkins, ApiError>> + Send;
fn custom_master(
&self,
master: MasterServer,
) -> impl Future<Output = Result<Master, ApiError>> + Send;
fn player(
&self,
player: &str,
) -> impl Future<Output = Result<Player, ApiError>> + Send;
fn query(
&self,
player: &str,
) -> impl Future<Output = Result<Vec<Query>, ApiError>> + Send;
fn query_map(
&self,
player: &str,
) -> impl Future<Output = Result<Vec<QueryMap>, ApiError>> + Send;
fn query_mapper(
&self,
player: &str,
) -> impl Future<Output = Result<Vec<QueryMapper>, ApiError>> + Send;
fn map(
&self,
map: &str,
) -> impl Future<Output = Result<Map, ApiError>> + Send;
fn releases_map(
&self,
) -> impl Future<Output = Result<Vec<ReleasesMaps>, ApiError>> + Send;
fn status(&self) -> impl Future<Output = Result<Status, ApiError>> + Send;
}
Required Methods§
fn master(&self) -> impl Future<Output = Result<Master, ApiError>> + Send
fn skins(&self) -> impl Future<Output = Result<DDSkins, ApiError>> + Send
fn custom_master( &self, master: MasterServer, ) -> impl Future<Output = Result<Master, ApiError>> + Send
fn player( &self, player: &str, ) -> impl Future<Output = Result<Player, ApiError>> + Send
fn query( &self, player: &str, ) -> impl Future<Output = Result<Vec<Query>, ApiError>> + Send
fn query_map( &self, player: &str, ) -> impl Future<Output = Result<Vec<QueryMap>, ApiError>> + Send
fn query_mapper( &self, player: &str, ) -> impl Future<Output = Result<Vec<QueryMapper>, ApiError>> + Send
fn map(&self, map: &str) -> impl Future<Output = Result<Map, ApiError>> + Send
fn releases_map( &self, ) -> impl Future<Output = Result<Vec<ReleasesMaps>, ApiError>> + Send
fn status(&self) -> impl Future<Output = Result<Status, ApiError>> + Send
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.