Struct ConnectIpState
pub struct ConnectIpState { /* private fields */ }masque only.Expand description
Validated, directional address/route state for one CONNECT-IP request stream.
These are peer statements, not authorization. A policy must intersect them with configured permissions before forwarding packets or installing routes.
Implementations§
§impl ConnectIpState
impl ConnectIpState
pub fn new(limits: ConnectIpStateLimits) -> ConnectIpState
pub fn new(limits: ConnectIpStateLimits) -> ConnectIpState
Start a stream with no in-band assignments or advertised routes.
pub fn limits(&self) -> ConnectIpStateLimits
pub fn limits(&self) -> ConnectIpStateLimits
The bounds used by this state.
pub fn snapshot(&self) -> Arc<ConnectIpStateSnapshot> ⓘ
pub fn snapshot(&self) -> Arc<ConnectIpStateSnapshot> ⓘ
Acquire a cheap immutable view of the current packet-routing state.
pub fn pending_requests(&self) -> usize
pub fn pending_requests(&self) -> usize
Number of local requests not yet answered.
pub fn next_request_id(
&mut self,
) -> Result<AddressRequestId, ConnectIpProtocolError>
pub fn next_request_id( &mut self, ) -> Result<AddressRequestId, ConnectIpProtocolError>
Reserve an unused local request ID. The request is recorded when sent.
pub fn receive(
&mut self,
capsule: &ConnectIpCapsule,
) -> Result<(), ConnectIpProtocolError>
pub fn receive( &mut self, capsule: &ConnectIpCapsule, ) -> Result<(), ConnectIpProtocolError>
Validate a received capsule and atomically publish its complete snapshot.
pub fn sent(
&mut self,
capsule: &ConnectIpCapsule,
) -> Result<(), ConnectIpProtocolError>
pub fn sent( &mut self, capsule: &ConnectIpCapsule, ) -> Result<(), ConnectIpProtocolError>
Validate and record an outgoing capsule transactionally. If transmission subsequently fails or is cancelled, discard this state with its stream; a peer may already have observed part of the update.
Methods from Deref<Target = ConnectIpStateSnapshot>§
pub fn local_addresses(&self) -> &[AddressAssignment]
pub fn local_addresses(&self) -> &[AddressAssignment]
Prefixes assigned to this endpoint.
pub fn peer_addresses(&self) -> &[AddressAssignment]
pub fn peer_addresses(&self) -> &[AddressAssignment]
Prefixes assigned to the peer.
pub fn local_routes(&self) -> &[IpRoute]
pub fn local_routes(&self) -> &[IpRoute]
Routes advertised by this endpoint.
pub fn peer_routes(&self) -> &[IpRoute]
pub fn peer_routes(&self) -> &[IpRoute]
Routes advertised by the peer.
Trait Implementations§
§impl Clone for ConnectIpState
impl Clone for ConnectIpState
§fn clone(&self) -> ConnectIpState
fn clone(&self) -> ConnectIpState
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 ConnectIpState
impl Debug for ConnectIpState
§impl Default for ConnectIpState
impl Default for ConnectIpState
§fn default() -> ConnectIpState
fn default() -> ConnectIpState
§impl Deref for ConnectIpState
impl Deref for ConnectIpState
§type Target = ConnectIpStateSnapshot
type Target = ConnectIpStateSnapshot
§fn deref(&self) -> &<ConnectIpState as Deref>::Target
fn deref(&self) -> &<ConnectIpState as Deref>::Target
Auto Trait Implementations§
impl Freeze for ConnectIpState
impl RefUnwindSafe for ConnectIpState
impl Send for ConnectIpState
impl Sync for ConnectIpState
impl Unpin for ConnectIpState
impl UnsafeUnpin for ConnectIpState
impl UnwindSafe for ConnectIpState
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