pub struct FipsEndpointDirectPacketRun { /* private fields */ }Expand description
Consecutive direct endpoint packets from one authenticated FIPS source.
This can chain opened EndpointData buffers and expose packet slices by range. That is the canonical direct dataplane endpoint payload contract for high-throughput embedders: FIPS owns authentication and ordering, while the embedder can still apply live routing policy before borrowing packet bytes for TUN writes.
Implementations§
Source§impl FipsEndpointDirectPacketRun
impl FipsEndpointDirectPacketRun
Sourcepub fn source_peer(&self) -> &PeerIdentity
pub fn source_peer(&self) -> &PeerIdentity
Authenticated FIPS peer that originated every packet in this run.
Sourcepub fn enqueued_at_ms(&self) -> u64
pub fn enqueued_at_ms(&self) -> u64
Unix-millisecond time when FIPS handed this run to the direct sink.
Sourcepub fn packet_bytes(&self) -> usize
pub fn packet_bytes(&self) -> usize
Sum of endpoint packet bytes, excluding bulk length metadata.
Sourcepub fn packet_slice(&self, index: usize) -> Option<&[u8]>
pub fn packet_slice(&self, index: usize) -> Option<&[u8]>
Borrow one packet by index.
Sourcepub fn packet_slices(&self) -> FipsEndpointDirectPacketSlices<'_>
pub fn packet_slices(&self) -> FipsEndpointDirectPacketSlices<'_>
Borrow packet bytes without materializing per-packet buffers.
Sourcepub fn retain_packets<F>(&mut self, keep: F)
pub fn retain_packets<F>(&mut self, keep: F)
Keep only packets accepted by the caller while preserving backing storage.
The predicate receives the original packet index and immutable bytes. This keeps routing/admission policy outside FIPS while allowing embedders to remove rejected ranges before a TUN writer borrows or mutates the run.
Sourcepub fn split_off_packets(
&mut self,
at: usize,
) -> Option<FipsEndpointDirectPacketRun>
pub fn split_off_packets( &mut self, at: usize, ) -> Option<FipsEndpointDirectPacketRun>
Split this run at a packet index without copying packet bytes.
The original run keeps packets before at; the returned run contains
packets from at onward with the same authenticated source metadata.
Trait Implementations§
Source§impl Clone for FipsEndpointDirectPacketRun
impl Clone for FipsEndpointDirectPacketRun
Source§fn clone(&self) -> FipsEndpointDirectPacketRun
fn clone(&self) -> FipsEndpointDirectPacketRun
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FipsEndpointDirectPacketRun
impl Debug for FipsEndpointDirectPacketRun
impl Eq for FipsEndpointDirectPacketRun
Source§impl PartialEq for FipsEndpointDirectPacketRun
impl PartialEq for FipsEndpointDirectPacketRun
Source§fn eq(&self, other: &FipsEndpointDirectPacketRun) -> bool
fn eq(&self, other: &FipsEndpointDirectPacketRun) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FipsEndpointDirectPacketRun
Auto Trait Implementations§
impl Freeze for FipsEndpointDirectPacketRun
impl RefUnwindSafe for FipsEndpointDirectPacketRun
impl Send for FipsEndpointDirectPacketRun
impl Sync for FipsEndpointDirectPacketRun
impl Unpin for FipsEndpointDirectPacketRun
impl UnsafeUnpin for FipsEndpointDirectPacketRun
impl UnwindSafe for FipsEndpointDirectPacketRun
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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