Trait DDnetApi

Source
pub trait DDnetApi {
    // Required methods
    fn master(&self) -> impl Future<Output = Result<Master, ApiError>> + Send;
    fn master_custom(
        &self,
        master: MasterServer,
    ) -> impl Future<Output = Result<Master, ApiError>> + Send;
    fn player(
        &self,
        player: &str,
    ) -> impl Future<Output = Result<DDPlayer, ApiError>> + Send;
    fn query(
        &self,
        player: &str,
    ) -> impl Future<Output = Result<Query, ApiError>> + Send;
    fn map(
        &self,
        map: &str,
    ) -> impl Future<Output = Result<DMap, ApiError>> + Send;
}

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

fn map(&self, map: &str) -> impl Future<Output = Result<DMap, 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§