pub enum HandleIncomingPacketResult<S> {
Result {
result: TunnResult,
},
Forwarded {
packet: Packet,
processed_at: Instant,
session_data: Arc<S>,
},
}Expand description
Packet-processing output for callers that also need the resolved tunnel session.
This is an opt-in extension of the original TunnResult-based API so the
dataplane can reuse the resolved session without forcing existing snap-tun
callers to change their control flow.
Variants§
Result
The result returned by the underlying WireGuard tunnel state machine when no tunneled SCION payload was forwarded.
Fields
§
result: TunnResultThe result returned by the underlying WireGuard tunnel state machine.
Forwarded
A forwarded tunneled SCION payload together with the processing metadata captured while the tunnel entry was already borrowed.
Implementations§
Source§impl<S> HandleIncomingPacketResult<S>
impl<S> HandleIncomingPacketResult<S>
Sourcepub fn into_result(self) -> TunnResult
pub fn into_result(self) -> TunnResult
Converts the result back into the underlying WireGuard tunnel result.
Auto Trait Implementations§
impl<S> Freeze for HandleIncomingPacketResult<S>
impl<S> RefUnwindSafe for HandleIncomingPacketResult<S>where
Arc<S>: RefUnwindSafe,
impl<S> Send for HandleIncomingPacketResult<S>
impl<S> Sync for HandleIncomingPacketResult<S>
impl<S> Unpin for HandleIncomingPacketResult<S>
impl<S> UnsafeUnpin for HandleIncomingPacketResult<S>where
Arc<S>: UnsafeUnpin,
impl<S> UnwindSafe for HandleIncomingPacketResult<S>where
Arc<S>: UnwindSafe,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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