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