RpcSessionExt

Trait RpcSessionExt 

Source
pub trait RpcSessionExt<T> {
    // Required method
    fn set_service<S>(&self, service: S)
       where S: ServiceDispatch;
}
Expand description

Extension trait for RpcSession to support single-service setup

Required Methods§

Source

fn set_service<S>(&self, service: S)
where S: ServiceDispatch,

Set a single service as the dispatcher for this session

This is a convenience method for cells that only expose one service. For multi-service cells, use set_dispatcher with a DispatcherBuilder.

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.

Implementations on Foreign Types§

Source§

impl<T> RpcSessionExt<T> for RpcSession<T>
where T: Transport + 'static,

Source§

fn set_service<S>(&self, service: S)
where S: ServiceDispatch,

Implementors§