Trait DDnetApi

Source
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§

Source

fn master(&self) -> impl Future<Output = Result<Master, ApiError>> + Send

Source

fn skins(&self) -> impl Future<Output = Result<DDSkins, ApiError>> + Send

Source

fn custom_master( &self, master: MasterServer, ) -> impl Future<Output = Result<Master, ApiError>> + Send

Source

fn player( &self, player: &str, ) -> impl Future<Output = Result<Player, ApiError>> + Send

Source

fn query( &self, player: &str, ) -> impl Future<Output = Result<Vec<Query>, ApiError>> + Send

Source

fn query_map( &self, player: &str, ) -> impl Future<Output = Result<Vec<QueryMap>, ApiError>> + Send

Source

fn query_mapper( &self, player: &str, ) -> impl Future<Output = Result<Vec<QueryMapper>, ApiError>> + Send

Source

fn map(&self, map: &str) -> impl Future<Output = Result<Map, ApiError>> + Send

Source

fn releases_map( &self, ) -> impl Future<Output = Result<Vec<ReleasesMaps>, ApiError>> + Send

Source

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.

Implementors§