pub struct ProxyConnectionPolicy { /* private fields */ }Expand description
Configuration of a proxy connection: where requests go, the answer-limit ceiling every session inherits, and optionally a pinned advertisement.
Both limits start at the proxy defaults
(QueryExecutionResourceLimits::default_for on
AnswerTransport::Proxy), the wire ceilings a default server enforces.
Implementations§
Source§impl ProxyConnectionPolicy
impl ProxyConnectionPolicy
Sourcepub fn new(endpoint: ProxyEndpoint) -> Self
pub fn new(endpoint: ProxyEndpoint) -> Self
Reach the server at endpoint with the built-in HTTP transport.
Sourcepub fn with_exchange(exchange: impl ProxyExchange) -> Self
pub fn with_exchange(exchange: impl ProxyExchange) -> Self
Reach the server through a caller-owned exchange.
Sourcepub fn staged_advertisement(self, staged_advertisement: Vec<u8>) -> Self
pub fn staged_advertisement(self, staged_advertisement: Vec<u8>) -> Self
Pin the staged (GET /v3/capabilities) advertisement, provisioned
out of band. It must name the same executor and reply key as the
connection’s advertisement; staged transactions then never fetch it.
Sourcepub const fn connection_limits(
self,
limits: QueryExecutionResourceLimits,
) -> Self
pub const fn connection_limits( self, limits: QueryExecutionResourceLimits, ) -> Self
Set the deadline for connecting, which fetches the advertisement.
Sourcepub const fn answer_limits(self, limits: QueryExecutionResourceLimits) -> Self
pub const fn answer_limits(self, limits: QueryExecutionResourceLimits) -> Self
Set the ceiling every session of this connection is constrained by.
Sourcepub fn advertisement(self, advertisement: Vec<u8>) -> Self
pub fn advertisement(self, advertisement: Vec<u8>) -> Self
Use these exact advertisement bytes, provisioned out of band, instead of fetching them when connecting.
Name the managed scope and semantic profile for a schema package that does not embed its authority. A package that embeds them must agree.
Trait Implementations§
Source§impl Debug for ProxyConnectionPolicy
impl Debug for ProxyConnectionPolicy
Source§impl From<ProxyConnectionPolicy> for ConnectionPolicy
impl From<ProxyConnectionPolicy> for ConnectionPolicy
Source§fn from(policy: ProxyConnectionPolicy) -> Self
fn from(policy: ProxyConnectionPolicy) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyConnectionPolicy
impl !UnwindSafe for ProxyConnectionPolicy
impl Freeze for ProxyConnectionPolicy
impl Send for ProxyConnectionPolicy
impl Sync for ProxyConnectionPolicy
impl Unpin for ProxyConnectionPolicy
impl UnsafeUnpin for ProxyConnectionPolicy
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request