pub struct InboundPacketRef<'a> {
pub client_id: Option<ClientId>,
pub remote_addr: SocketAddr,
pub bytes: &'a [u8],
}Expand description
Borrowed inbound packet backed by a transport-owned receive buffer.
Fields§
§client_id: Option<ClientId>Known client id for remote_addr, if the transport has one registered.
remote_addr: SocketAddrAddress the datagram came from.
bytes: &'a [u8]Encoded bytes valid until the transport is mutably reused.
Implementations§
Source§impl InboundPacketRef<'_>
impl InboundPacketRef<'_>
Sourcepub fn to_owned(self) -> InboundPacket
pub fn to_owned(self) -> InboundPacket
Materializes the compatible owned packet shape.
Trait Implementations§
Source§impl<'a> Clone for InboundPacketRef<'a>
impl<'a> Clone for InboundPacketRef<'a>
Source§fn clone(&self) -> InboundPacketRef<'a>
fn clone(&self) -> InboundPacketRef<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for InboundPacketRef<'a>
Source§impl<'a> Debug for InboundPacketRef<'a>
impl<'a> Debug for InboundPacketRef<'a>
impl<'a> Eq for InboundPacketRef<'a>
Source§impl<'a> PartialEq for InboundPacketRef<'a>
impl<'a> PartialEq for InboundPacketRef<'a>
impl<'a> StructuralPartialEq for InboundPacketRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for InboundPacketRef<'a>
impl<'a> RefUnwindSafe for InboundPacketRef<'a>
impl<'a> Send for InboundPacketRef<'a>
impl<'a> Sync for InboundPacketRef<'a>
impl<'a> Unpin for InboundPacketRef<'a>
impl<'a> UnsafeUnpin for InboundPacketRef<'a>
impl<'a> UnwindSafe for InboundPacketRef<'a>
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