pub struct LazyQuinnTransport { /* private fields */ }Expand description
A quinn RPC transport that connects on first use and caches the session.
Implementations§
Source§impl LazyQuinnTransport
impl LazyQuinnTransport
Sourcepub fn new(
addr: SocketAddr,
server_name: impl Into<String>,
auth: QuicServerAuth,
) -> Self
pub fn new( addr: SocketAddr, server_name: impl Into<String>, auth: QuicServerAuth, ) -> Self
Create a lazy transport for a QUIC peer, authenticated per auth
(WebPKI, cert-hash pin, or — later — RFC 7250 raw key). No connection is
made until the first send().
Trait Implementations§
Source§impl Transport for LazyQuinnTransport
impl Transport for LazyQuinnTransport
Source§fn forbids_cleartext_envelope(&self) -> bool
fn forbids_cleartext_envelope(&self) -> bool
QUIC is an untrusted carrier for envelope confidentiality — cleartext
forbidden unconditionally, matching the concrete
QuinnTransport and
EndpointType::Quic. A loopback address is not
evidence the bytes stay inside the trust boundary (it can terminate at a
proxy/tunnel), so it earns no exemption; local trusted RPC uses UDS/inproc.
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 LazyQuinnTransport
impl !RefUnwindSafe for LazyQuinnTransport
impl Send for LazyQuinnTransport
impl Sync for LazyQuinnTransport
impl Unpin for LazyQuinnTransport
impl UnsafeUnpin for LazyQuinnTransport
impl !UnwindSafe for LazyQuinnTransport
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
§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