pub struct RecvInfo { /* private fields */ }unstable-custom-transports only.Expand description
Per-packet recv data filled in by transports during poll_recv.
This carries the bits of [noq_udp::RecvMeta] that custom transports
can’t express through RecvMeta itself: the remote address as a
CustomAddr and, optionally, the local custom address that received
the packet. For IP transports the kernel populates RecvMeta directly;
for relays the local URL is the remote’s relay URL — so for them this
struct is filled in only with the remote variant.
Custom transport authors construct values via RecvInfo::new, which
only accepts CustomAddr.
Implementations§
Source§impl RecvInfo
impl RecvInfo
Sourcepub fn new(remote: CustomAddr, local: Option<CustomAddr>) -> Self
pub fn new(remote: CustomAddr, local: Option<CustomAddr>) -> Self
Creates a new RecvInfo for an incoming packet on a custom transport.
remote is the remote custom address. local is the local custom
address that received this packet, if the transport can identify it;
pass None otherwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RecvInfo
impl RefUnwindSafe for RecvInfo
impl Send for RecvInfo
impl Sync for RecvInfo
impl Unpin for RecvInfo
impl UnwindSafe for RecvInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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