pub struct RpcClient { /* private fields */ }Implementations
sourceimpl RpcClient
impl RpcClient
sourcepub fn new<H>(client: impl AsyncClient + 'static, handlers: H) -> Self where
H: RpcHandlers + Send + Sync + 'static,
pub fn new<H>(client: impl AsyncClient + 'static, handlers: H) -> Self where
H: RpcHandlers + Send + Sync + 'static,
Panics
Should not panic
sourcepub fn create<H>(
client: impl AsyncClient + 'static,
handlers: H,
opts: Options
) -> Self where
H: RpcHandlers + Send + Sync + 'static,
pub fn create<H>(
client: impl AsyncClient + 'static,
handlers: H,
opts: Options
) -> Self where
H: RpcHandlers + Send + Sync + 'static,
Panics
Should not panic
Trait Implementations
sourceimpl Rpc for RpcClient
impl Rpc for RpcClient
sourcefn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
method: &'life2 str,
params: Cow<'async_trait>,
qos: QoS
) -> Pin<Box<dyn Future<Output = Result<RpcEvent, RpcError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
method: &'life2 str,
params: Cow<'async_trait>,
qos: QoS
) -> Pin<Box<dyn Future<Output = Result<RpcEvent, RpcError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Panics
Will panic on poisoned mutex
sourcefn client(&self) -> Arc<Mutex<dyn AsyncClient + 'static>>
fn client(&self) -> Arc<Mutex<dyn AsyncClient + 'static>>
When created, elbus client is wrapped with Arc<Mutex<_>> to let it be sent into the incoming frames handler future Read more
fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 str,
data: Cow<'async_trait>,
qos: QoS
) -> Pin<Box<dyn Future<Output = Result<OpConfirm, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
sourcefn call0<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
method: &'life2 str,
params: Cow<'async_trait>,
qos: QoS
) -> Pin<Box<dyn Future<Output = Result<OpConfirm, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn call0<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
method: &'life2 str,
params: Cow<'async_trait>,
qos: QoS
) -> Pin<Box<dyn Future<Output = Result<OpConfirm, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Call the method, no response is required
fn is_connected(&self) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl !UnwindSafe for RpcClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more