pub trait SessionCommand: Send + Sync {
// Required methods
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn command_type(&self) -> &str;
// Provided method
fn payload(&self) -> Value { ... }
}Expand description
Command to be executed in a session queue
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the command
Sourcefn command_type(&self) -> &str
fn command_type(&self) -> &str
Get command type (for logging/debugging)