pub struct RpcClient<T, P>{ /* private fields */ }Expand description
RPC client implemented over an owned native-frame transport.
Implementations§
Source§impl<T, P> RpcClient<T, P>
impl<T, P> RpcClient<T, P>
Sourcepub fn new(transport: Arc<T>, uri_provider: Arc<P>) -> Self
pub fn new(transport: Arc<T>, uri_provider: Arc<P>) -> Self
Creates an RPC client over an owned native-frame transport.
Sourcepub async fn invoke_method(
&self,
method: UUri,
call_options: CallOptions,
payload: Option<UPayload>,
) -> Result<Option<UPayload>, ServiceInvocationError>
pub async fn invoke_method( &self, method: UUri, call_options: CallOptions, payload: Option<UPayload>, ) -> Result<Option<UPayload>, ServiceInvocationError>
Invokes an RPC method using owned native frames.
Source§impl<T, P> RpcClient<T, P>
impl<T, P> RpcClient<T, P>
Sourcepub async fn invoke_typed<Request, Response>(
&self,
method: UUri,
call_options: CallOptions,
request: &Request,
) -> Result<Response, ServiceInvocationError>
pub async fn invoke_typed<Request, Response>( &self, method: UUri, call_options: CallOptions, request: &Request, ) -> Result<Response, ServiceInvocationError>
Invokes an RPC method using the transport endpoint’s selected wire.
Trait Implementations§
Source§impl<T, P> RpcClient for RpcClient<T, P>
impl<T, P> RpcClient for RpcClient<T, P>
Source§fn invoke_method<'life0, 'async_trait>(
&'life0 self,
method: UUri,
call_options: CallOptions,
payload: Option<UPayload>,
) -> Pin<Box<dyn Future<Output = Result<Option<UPayload>, ServiceInvocationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_method<'life0, 'async_trait>(
&'life0 self,
method: UUri,
call_options: CallOptions,
payload: Option<UPayload>,
) -> Pin<Box<dyn Future<Output = Result<Option<UPayload>, ServiceInvocationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invokes a method on a service. Read more
Auto Trait Implementations§
impl<T, P> Freeze for RpcClient<T, P>
impl<T, P> RefUnwindSafe for RpcClient<T, P>
impl<T, P> Send for RpcClient<T, P>
impl<T, P> Sync for RpcClient<T, P>
impl<T, P> Unpin for RpcClient<T, P>
impl<T, P> UnwindSafe for RpcClient<T, P>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.