Skip to main content

DynamicHubRpcServer

Trait DynamicHubRpcServer 

Source
pub trait DynamicHubRpcServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn call<'life0, 'async_trait>(
        &'life0 self,
        subscription_sink: PendingSubscriptionSink,
        method: String,
        params: Option<Value>,
    ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn hash<'life0, 'async_trait>(
        &'life0 self,
        subscription_sink: PendingSubscriptionSink,
    ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn hashes<'life0, 'async_trait>(
        &'life0 self,
        subscription_sink: PendingSubscriptionSink,
    ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the DynamicHubRpc RPC API.

Required Methods§

Source

fn call<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, method: String, params: Option<Value>, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Route a call to a registered activation

Source

fn hash<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get Plexus RPC server configuration hash (from the recursive schema) This hash changes whenever any method or child activation changes. It’s computed from the method hashes rolled up through the schema tree.

Source

fn hashes<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get plugin hashes for cache validation (lightweight alternative to full schema)

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

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.

Implementors§