Skip to main content

Intermediary

Struct Intermediary 

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

A reusable operational intermediary configuration.

Implementations§

Source§

impl Intermediary<()>

Source

pub fn builder() -> IntermediaryBuilder

Starts composition of the two complete role configurations.

Source§

impl<ST, SA, SM, Connector, CT, CA, CM, Resolver, Route, Policy, Boundary, K> Intermediary<Server<ST, SA, SM>, Client<Connector, CT, CA, CM>, Resolver, Route, Policy, Boundary, K>

Source

pub async fn accept<DT, State, Peer, CW, UT, CE>( &self, transport: DT, peer: Peer, state: State, ) -> Result<IntermediaryAccept<IntermediaryConnection<DT, UT, State, Peer, <SA::Authentication as ServerAuthentication<Peer>>::Identity, CA::Evidence, <SM as MiddlewareFactory<ServerConnectionContext<Peer, <SA::Authentication as ServerAuthentication<Peer>>::Identity>>>::Handler, <CM as MiddlewareFactory<ClientInitialContext>>::Handler, <Boundary as IntermediaryMiddlewareFactory<ServerConnectionContext<Peer, <SA::Authentication as ServerAuthentication<Peer>>::Identity>, ClientConnectionContext<CA::Evidence>>>::Handler, Policy, K>>, IntermediaryAcceptError<AcceptError<<ST::Provider as ServerIdentityProvider>::Error, <SA::Authentication as ServerAuthentication<Peer>>::Error>, Resolver::Error, Route::Error, ConnectError<CE, ClientTlsError<<CT::Provider as ClientTlsProvider>::Error>, ClientAuthenticationError<CA::Error>>, K::Error, CancelError<CE>>>

Establishes both independently authenticated roles around one shared state.

§Errors

Returns the typed failure from either role or routing policy, or explicit cancellation rejection.

Trait Implementations§

Source§

impl<S, C, R, A, P, B, K> Debug for Intermediary<S, C, R, A, P, B, K>

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<Server, Client, Resolver, Route, Policy, Boundary, Cancellation> UnwindSafe for Intermediary<Server, Client, Resolver, Route, Policy, Boundary, Cancellation>
where Server: UnwindSafe, Client: UnwindSafe, Resolver: UnwindSafe, Route: UnwindSafe, Policy: UnwindSafe, Boundary: UnwindSafe, Cancellation: 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.