Struct QuicMigrationLayer
pub struct QuicMigrationLayer { /* private fields */ }quic and std only.Expand description
Supervise an established QUIC relay with a normal Rama policy service.
The policy may prepare transports using native sockets, NE/WFP adapters, tunnels or any other DatagramSocket factory. It must preserve the deployment’s egress routing policy. Newer notifications cancel an unfinished decision; prepared transports are dropped. Independent connections must have dedicated endpoints for transport replacement.
Implementations§
§impl QuicMigrationLayer
impl QuicMigrationLayer
pub fn new<P>(policy: P, config: QuicMigrationConfig) -> QuicMigrationLayerwhere
P: Service<QuicMigrationInput, Output = QuicMigrationDecision, Error = Box<dyn Error + Send + Sync>>,
pub fn with_decision_gate(self, gate: Arc<Semaphore>) -> QuicMigrationLayer
pub fn with_decision_gate(self, gate: Arc<Semaphore>) -> QuicMigrationLayer
Bound concurrent policy preparations across connections sharing this gate. Waiting does not consume the decision timeout. New observations and connection closure cancel the wait; the permit is released after applying the decision. This does not bound native QUIC path validations or add packet-path work.
pub fn set_decision_gate(
&mut self,
gate: Arc<Semaphore>,
) -> &mut QuicMigrationLayer
pub fn set_decision_gate( &mut self, gate: Arc<Semaphore>, ) -> &mut QuicMigrationLayer
Bound concurrent policy preparations across connections sharing this gate. Waiting does not consume the decision timeout. New observations and connection closure cancel the wait; the permit is released after applying the decision. This does not bound native QUIC path validations or add packet-path work.
pub fn with_network_changes(
self,
changes: QuicNetworkChanges,
) -> QuicMigrationLayer
pub fn with_network_changes( self, changes: QuicNetworkChanges, ) -> QuicMigrationLayer
Subscribe to trusted platform network changes in addition to native path changes.
pub fn set_network_changes(
&mut self,
changes: QuicNetworkChanges,
) -> &mut QuicMigrationLayer
pub fn set_network_changes( &mut self, changes: QuicNetworkChanges, ) -> &mut QuicMigrationLayer
Subscribe to trusted platform network changes in addition to native path changes.
Trait Implementations§
§impl Clone for QuicMigrationLayer
impl Clone for QuicMigrationLayer
§fn clone(&self) -> QuicMigrationLayer
fn clone(&self) -> QuicMigrationLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for QuicMigrationLayer
impl Debug for QuicMigrationLayer
§impl<S> Layer<S> for QuicMigrationLayer
impl<S> Layer<S> for QuicMigrationLayer
§type Service = QuicMigrationService<S>
type Service = QuicMigrationService<S>
§fn layer(&self, inner: S) -> <QuicMigrationLayer as Layer<S>>::Service
fn layer(&self, inner: S) -> <QuicMigrationLayer as Layer<S>>::Service
§fn into_layer(self, inner: S) -> <QuicMigrationLayer as Layer<S>>::Service
fn into_layer(self, inner: S) -> <QuicMigrationLayer as Layer<S>>::Service
layer but consuming self after the service was created. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for QuicMigrationLayer
impl !UnwindSafe for QuicMigrationLayer
impl Forget for QuicMigrationLayer
impl Freeze for QuicMigrationLayer
impl Move for QuicMigrationLayer
impl Send for QuicMigrationLayer
impl Sync for QuicMigrationLayer
impl Unpin for QuicMigrationLayer
impl UnsafeUnpin for QuicMigrationLayer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> ⓘ
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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more