pub struct InMemoryRpcServer<T, P> { /* private fields */ }Expand description
An RpcServer which keeps all information about registered endpoints in memory.
The server requires an implementations of UTransport for receiving RPC Request messages
from clients and sending back RPC Response messages.
For each endpoint being registered, a UListener is created for
the given request handler and registered with the underlying transport. The listener is also
mapped to the endpoint’s method resource ID in order to prevent registration of multiple
request handlers for the same method.
Implementations§
Source§impl<T: UTransport, P: LocalUriProvider> InMemoryRpcServer<T, P>
impl<T: UTransport, P: LocalUriProvider> InMemoryRpcServer<T, P>
Trait Implementations§
Source§impl<T, P> Debug for InMemoryRpcServer<T, P>
impl<T, P> Debug for InMemoryRpcServer<T, P>
Source§impl<T: UTransport + 'static, P: LocalUriProvider> RpcServer for InMemoryRpcServer<T, P>
impl<T: UTransport + 'static, P: LocalUriProvider> RpcServer for InMemoryRpcServer<T, P>
Source§fn register_endpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
origin_filter: Option<&'life1 UUri>,
resource_id: u16,
request_handler: Arc<dyn RequestHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_endpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
origin_filter: Option<&'life1 UUri>,
resource_id: u16,
request_handler: Arc<dyn RequestHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Registers an endpoint for RPC requests. Read more
Source§fn unregister_endpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
origin_filter: Option<&'life1 UUri>,
resource_id: u16,
_request_handler: Arc<dyn RequestHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unregister_endpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
origin_filter: Option<&'life1 UUri>,
resource_id: u16,
_request_handler: Arc<dyn RequestHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), RegistrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deregisters a previously registered endpoint. Read more
Auto Trait Implementations§
impl<T, P> !Freeze for InMemoryRpcServer<T, P>
impl<T, P> !RefUnwindSafe for InMemoryRpcServer<T, P>
impl<T, P> Send for InMemoryRpcServer<T, P>
impl<T, P> Sync for InMemoryRpcServer<T, P>
impl<T, P> Unpin for InMemoryRpcServer<T, P>
impl<T, P> !UnwindSafe for InMemoryRpcServer<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.