pub struct SessionRpcTransport<S: Session> { /* private fields */ }Expand description
Wraps a [web_transport_trait::Session] as a Transport for RPC plane
traffic. Generic over the session impl, so the same client logic rides iroh,
quinn, or any future Session backend.
Clone-cheap — Session is Clone (reference-counted internally by the
underlying QUIC connection).
Implementations§
Trait Implementations§
Source§impl<S: Clone + Session> Clone for SessionRpcTransport<S>
impl<S: Clone + Session> Clone for SessionRpcTransport<S>
Source§fn clone(&self) -> SessionRpcTransport<S>
fn clone(&self) -> SessionRpcTransport<S>
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<S: Session> Transport for SessionRpcTransport<S>
impl<S: Session> Transport for SessionRpcTransport<S>
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).
Source§fn forbids_cleartext_envelope(&self) -> bool
fn forbids_cleartext_envelope(&self) -> bool
Whether this carrier forbids cleartext request envelopes. Read more
Auto Trait Implementations§
impl<S> Freeze for SessionRpcTransport<S>where
S: Freeze,
impl<S> RefUnwindSafe for SessionRpcTransport<S>where
S: RefUnwindSafe,
impl<S> Send for SessionRpcTransport<S>
impl<S> Sync for SessionRpcTransport<S>
impl<S> Unpin for SessionRpcTransport<S>where
S: Unpin,
impl<S> UnsafeUnpin for SessionRpcTransport<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SessionRpcTransport<S>where
S: UnwindSafe,
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