Trait UtilitySession
pub trait UtilitySession: Send + 'static {
// Required method
fn send(
&mut self,
command: UtilitySessionCommand,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CommandError>> + Send + '_>>;
// Provided method
fn close(&mut self, _reason: u32) -> Result<Vec<u8>, CommandError> { ... }
}Expand description
Stateful implementation hosted for one long-lived Utility session.
Required Methods§
fn send(
&mut self,
command: UtilitySessionCommand,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CommandError>> + Send + '_>>
fn send( &mut self, command: UtilitySessionCommand, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CommandError>> + Send + '_>>
Handles one bounded command. Semantic output is emitted separately.