pub trait Command: Sync {
type Output: DeserializeOwned;
// Required methods
fn path(&self) -> Cow<'static, str>;
fn params(&self) -> Vec<(&'static str, Cow<'_, str>)>;
// Provided method
fn execute<E: Executor + Send + Sync>(
&self,
client: &Client<E>,
) -> impl Future<Output = Result<Self::Output, Error>> + Send { ... }
}
Required Associated Types§
type Output: DeserializeOwned
Required Methods§
fn path(&self) -> Cow<'static, str>
fn params(&self) -> Vec<(&'static str, Cow<'_, str>)>
Provided Methods§
fn execute<E: Executor + Send + Sync>( &self, client: &Client<E>, ) -> impl Future<Output = Result<Self::Output, Error>> + 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.