pub struct InMemoryTransport { /* private fields */ }Expand description
In-process RPC transport over an IrohRequestProcessor.
Cheaply cloneable: holds an Arc to the shared processor.
Implementations§
Source§impl InMemoryTransport
impl InMemoryTransport
Sourcepub fn new(processor: Arc<dyn IrohRequestProcessor>) -> Self
pub fn new(processor: Arc<dyn IrohRequestProcessor>) -> Self
Dial a co-located service by its already-resolved request processor.
Trait Implementations§
Source§impl Clone for InMemoryTransport
impl Clone for InMemoryTransport
Source§fn clone(&self) -> InMemoryTransport
fn clone(&self) -> InMemoryTransport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Transport for InMemoryTransport
impl Transport for InMemoryTransport
Source§fn forbids_cleartext_envelope(&self) -> bool
fn forbids_cleartext_envelope(&self) -> bool
Same-process, zero-copy carrier: never leaves the address space, so cleartext envelopes are permitted (explicit opt-out of the fail-closed default).
Source§type Sub = Pending<Result<Vec<Vec<u8>>, Error>>
type Sub = Pending<Result<Vec<Vec<u8>>, Error>>
Subscriber type for data streams (server→client).
Must yield ZMTP multipart frames as
Vec<Vec<u8>>.Source§type Pub = RpcPublishStub
type Pub = RpcPublishStub
Publisher type for control channel (client→server).
Source§fn send<'life0, 'async_trait>(
&'life0 self,
payload: Vec<u8>,
timeout_ms: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
payload: Vec<u8>,
timeout_ms: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a request and receive a response (REQ/REP pattern). Read more
Source§fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
_topic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Sub>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
_topic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Sub>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe to a topic (SUB pattern). Returns a stream of multipart frames.
Source§fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
_topic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Pub>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
_topic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Self::Pub>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open a publish channel to a topic (PUB/PUSH pattern for ctrl messages).
Auto Trait Implementations§
impl Freeze for InMemoryTransport
impl !RefUnwindSafe for InMemoryTransport
impl Send for InMemoryTransport
impl Sync for InMemoryTransport
impl Unpin for InMemoryTransport
impl UnsafeUnpin for InMemoryTransport
impl !UnwindSafe for InMemoryTransport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more