Skip to main content

SdkService

Trait SdkService 

Source
pub trait SdkService: Send {
    // Required methods
    fn execute<'life0, 'async_trait>(
        &'life0 mut self,
        request: SdkRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Value, SdkError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn events<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SdkRuntimeEvent>, SdkError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn capabilities(&self) -> SdkCapabilities { ... }
}
Expand description

Stateful SDK facade consumed by public transport adapters.

Required Methods§

Source

fn execute<'life0, 'async_trait>( &'life0 mut self, request: SdkRequest, ) -> Pin<Box<dyn Future<Output = Result<Value, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute one typed request. Transport correlation fields are not part of this API and therefore cannot contaminate canonical state.

Source

fn events<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SdkRuntimeEvent>, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Poll canonical runtime events without a transport envelope.

Provided Methods§

Source

fn capabilities(&self) -> SdkCapabilities

Describe the versioned contract without invoking a runtime.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§