pub struct LargeBlobServiceRegistryClient<T: Transport> {
pub echo_method_id: u32,
pub xor_transform_method_id: u32,
pub checksum_method_id: u32,
/* private fields */
}Expand description
Registry-aware client stub for the #trait_name service.
This client looks up method IDs from a [ServiceRegistry] at construction time,
ensuring that method IDs are globally unique across all registered services.
It has the same RpcSession requirements as [#client_name].
Fields§
§echo_method_id: u32§xor_transform_method_id: u32§checksum_method_id: u32Implementations§
Source§impl<T: Transport + Send + Sync + 'static> LargeBlobServiceRegistryClient<T>
impl<T: Transport + Send + Sync + 'static> LargeBlobServiceRegistryClient<T>
Sourcepub fn new(session: Arc<RpcSession<T>>, registry: &ServiceRegistry) -> Self
pub fn new(session: Arc<RpcSession<T>>, registry: &ServiceRegistry) -> Self
Create a new registry-aware client.
Looks up method IDs from the registry. The service must be registered in the registry before calling this constructor.
The session’s demux loop (session.run()) must be running for RPC calls to work.
§Panics
Panics if the service or any of its methods are not found in the registry.
Sourcepub fn session(&self) -> &Arc<RpcSession<T>>
pub fn session(&self) -> &Arc<RpcSession<T>>
Get a reference to the underlying session.
Sourcepub async fn echo(&self, data: Vec<u8>) -> Result<Vec<u8>, RpcError>
pub async fn echo(&self, data: Vec<u8>) -> Result<Vec<u8>, RpcError>
Call the #name method on the remote service.
Auto Trait Implementations§
impl<T> Freeze for LargeBlobServiceRegistryClient<T>
impl<T> !RefUnwindSafe for LargeBlobServiceRegistryClient<T>
impl<T> Send for LargeBlobServiceRegistryClient<T>
impl<T> Sync for LargeBlobServiceRegistryClient<T>
impl<T> Unpin for LargeBlobServiceRegistryClient<T>
impl<T> !UnwindSafe for LargeBlobServiceRegistryClient<T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more