Struct EndpointRouteDirectory
pub struct EndpointRouteDirectory { /* private fields */ }quic and std only.Expand description
Bounded routing hints for endpoints in one trusted policy domain.
Register endpoints before admitting their first connection. Keep each registration alive for its connection’s lifetime. Original destination is part of every lookup. The directory does not share endpoint drivers, connection locks, TLS configuration or payload queues.
Implementations§
§impl EndpointRouteDirectory
impl EndpointRouteDirectory
pub fn new(max_endpoints: NonZero<usize>) -> EndpointRouteDirectory
pub fn is_full(&self) -> bool
pub fn is_full(&self) -> bool
Whether the registration budget is currently exhausted. This snapshot reserves no slot.
pub fn register(
&self,
endpoint: &Endpoint,
local: SocketAddress,
) -> Result<EndpointRouteRegistration, Error>
pub fn register( &self, endpoint: &Endpoint, local: SocketAddress, ) -> Result<EndpointRouteRegistration, Error>
Register an independent endpoint. An endpoint can belong to only one directory.
pub fn route(
&self,
local: SocketAddress,
data: &[u8],
) -> Result<Option<EndpointRoute>, Error>
pub fn route( &self, local: SocketAddress, data: &[u8], ) -> Result<Option<EndpointRoute>, Error>
Select an endpoint using its native CID lifecycle hints, borrowing the datagram.
A returned hint may retire immediately. Once returned, send to that endpoint or drop; never reinterpret a later native rejection as permission to forward elsewhere. Colliding identifiers are ambiguous and are refused, not resolved by iteration order.
Trait Implementations§
§impl Clone for EndpointRouteDirectory
impl Clone for EndpointRouteDirectory
§fn clone(&self) -> EndpointRouteDirectory
fn clone(&self) -> EndpointRouteDirectory
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for EndpointRouteDirectory
impl !UnwindSafe for EndpointRouteDirectory
impl Forget for EndpointRouteDirectory
impl Freeze for EndpointRouteDirectory
impl Move for EndpointRouteDirectory
impl Send for EndpointRouteDirectory
impl Sync for EndpointRouteDirectory
impl Unpin for EndpointRouteDirectory
impl UnsafeUnpin for EndpointRouteDirectory
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