pub struct ServiceClient { /* private fields */ }
Expand description
Client for making RPC calls to other services
Implementations§
Source§impl ServiceClient
impl ServiceClient
pub fn new(rpc: Arc<RpcFramework>) -> Self
Sourcepub async fn call_service(
&self,
target_service: impl Into<String>,
method: impl Into<String>,
params: impl Serialize,
) -> Result<RpcResponse>
pub async fn call_service( &self, target_service: impl Into<String>, method: impl Into<String>, params: impl Serialize, ) -> Result<RpcResponse>
Call another service method
Sourcepub async fn call_service_with_timeout(
&self,
target_service: impl Into<String>,
method: impl Into<String>,
params: impl Serialize,
timeout: Duration,
) -> Result<RpcResponse>
pub async fn call_service_with_timeout( &self, target_service: impl Into<String>, method: impl Into<String>, params: impl Serialize, timeout: Duration, ) -> Result<RpcResponse>
Call with custom timeout
Trait Implementations§
Source§impl Clone for ServiceClient
impl Clone for ServiceClient
Source§fn clone(&self) -> ServiceClient
fn clone(&self) -> ServiceClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ServiceClient
impl !RefUnwindSafe for ServiceClient
impl Send for ServiceClient
impl Sync for ServiceClient
impl Unpin for ServiceClient
impl !UnwindSafe for ServiceClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more