pub struct RpcEndpoint { /* private fields */ }Expand description
RPC Endpoint (replacing Java’s RpcEndPoint)
Implementations§
Source§impl RpcEndpoint
impl RpcEndpoint
Sourcepub async fn connect(host: String, port: u16) -> Result<Self>
pub async fn connect(host: String, port: u16) -> Result<Self>
Create and connect to the remote endpoint
Sourcepub async fn sync_call(
&self,
method: Bytes,
body: Bytes,
timeout_ms: u64,
) -> Result<Bytes>
pub async fn sync_call( &self, method: Bytes, body: Bytes, timeout_ms: u64, ) -> Result<Bytes>
Synchronous RPC call
Sourcepub async fn notify_call(&self, method: Bytes, body: Bytes) -> Result<()>
pub async fn notify_call(&self, method: Bytes, body: Bytes) -> Result<()>
Asynchronous RPC call (fire and forget)
pub fn host(&self) -> &str
pub fn port(&self) -> u16
Trait Implementations§
Source§impl Clone for RpcEndpoint
impl Clone for RpcEndpoint
Source§fn clone(&self) -> RpcEndpoint
fn clone(&self) -> RpcEndpoint
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 RpcEndpoint
impl RefUnwindSafe for RpcEndpoint
impl Send for RpcEndpoint
impl Sync for RpcEndpoint
impl Unpin for RpcEndpoint
impl UnwindSafe for RpcEndpoint
Blanket Implementations§
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