Skip to main content

IntermediaryBuilder

Struct IntermediaryBuilder 

Source
pub struct IntermediaryBuilder<Server = (), Client = (), Resolver = (), Route = AllowAuthenticatedRoute, Policy = NoPipeline, Boundary = IdentityIntermediaryMiddleware, Cancellation = RejectCancellation> { /* private fields */ }
Expand description

Progressive builder for Intermediary.

Implementations§

Source§

impl<S, C, R, A, P, B, K> IntermediaryBuilder<S, C, R, A, P, B, K>

Source

pub fn server<Next>( self, server: Next, ) -> IntermediaryBuilder<Next, C, R, A, P, B, K>

Supplies the complete client-facing role configuration.

Source

pub fn client<Next>( self, client: Next, ) -> IntermediaryBuilder<S, Next, R, A, P, B, K>

Supplies the complete PostgreSQL-facing role configuration.

Source

pub fn startup_resolver<Next>( self, resolver: Next, ) -> IntermediaryBuilder<S, C, Next, A, P, B, K>

Supplies the required asynchronous startup resolver.

Source

pub fn authenticated_route<Next>( self, route: Next, ) -> IntermediaryBuilder<S, C, R, Next, P, B, K>

Supplies optional post-authentication routing policy.

Source

pub fn pipeline<Next: PipelinePolicy>( self, pipeline: Next, ) -> IntermediaryBuilder<S, C, R, A, Next, B, K>

Selects lock-step or bounded request pipelining.

Source

pub fn middleware<Next>( self, boundary: Next, ) -> IntermediaryBuilder<S, C, R, A, P, Next, K>

Supplies middleware for the forwarding boundary.

Source

pub fn cancellation(self, cancellation: CancellationPolicy) -> Self

Selects an explicit cancellation posture.

Source

pub fn establishment_failure(self, policy: EstablishmentFailurePolicy) -> Self

Selects conservative close or one fixed safe diagnostic on establishment failure.

Source

pub fn cancellation_registry<Next>( self, registry: Next, ) -> IntermediaryBuilder<S, C, R, A, P, B, Next>

Enables forwarding through an application-owned concurrent registry.

Source

pub fn build( self, ) -> Result<Intermediary<S, C, R, A, P, B, K>, IntermediaryBuildError>

Validates composition and creates a reusable component.

§Errors

Returns the first missing mandatory role, resolver, or cancellation configuration.

Trait Implementations§

Source§

impl Default for IntermediaryBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> Freeze for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: Freeze, Policy: Freeze, Boundary: Freeze, Cancellation: Freeze, Server: Freeze, Client: Freeze, Resolver: Freeze,

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> RefUnwindSafe for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: RefUnwindSafe, Policy: RefUnwindSafe, Boundary: RefUnwindSafe, Cancellation: RefUnwindSafe, Server: RefUnwindSafe, Client: RefUnwindSafe, Resolver: RefUnwindSafe,

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> Send for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: Send, Policy: Send, Boundary: Send, Cancellation: Send, Server: Send, Client: Send, Resolver: Send,

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> Sync for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: Sync, Policy: Sync, Boundary: Sync, Cancellation: Sync, Server: Sync, Client: Sync, Resolver: Sync,

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> Unpin for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: Unpin, Policy: Unpin, Boundary: Unpin, Cancellation: Unpin, Server: Unpin, Client: Unpin, Resolver: Unpin,

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> UnsafeUnpin for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: UnsafeUnpin, Policy: UnsafeUnpin, Boundary: UnsafeUnpin, Cancellation: UnsafeUnpin, Server: UnsafeUnpin, Client: UnsafeUnpin, Resolver: UnsafeUnpin,

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> UnwindSafe for IntermediaryBuilder<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Route: UnwindSafe, Policy: UnwindSafe, Boundary: UnwindSafe, Cancellation: UnwindSafe, Server: UnwindSafe, Client: UnwindSafe, Resolver: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.