pub trait Adapter:
Send
+ Sync
+ 'static {
// Required methods
fn initialize<'life0, 'async_trait>(
&'life0 self,
configuration: Value,
context: RequestContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceDescriptor>, CallError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
context: RequestContext,
) -> Pin<Box<dyn Future<Output = Result<Value, CallError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
Sourcefn initialize<'life0, 'async_trait>(
&'life0 self,
configuration: Value,
context: RequestContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceDescriptor>, CallError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
configuration: Value,
context: RequestContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceDescriptor>, CallError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open the connection and return supported operations, immutable until exit.
Sourcefn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
context: RequestContext,
) -> Pin<Box<dyn Future<Output = Result<Value, CallError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
context: RequestContext,
) -> Pin<Box<dyn Future<Output = Result<Value, CallError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Calls run concurrently. Protect shared device state, observe cancellation, finish cleanup, and return the authoritative outcome.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".