Struct smoltcp::wire::UdpRepr
[−]
[src]
pub struct UdpRepr<'a> { pub src_port: u16, pub dst_port: u16, pub payload: &'a [u8], }
A high-level representation of an User Datagram Protocol packet.
Fields
src_port: u16
dst_port: u16
payload: &'a [u8]
Methods
impl<'a> Repr<'a>
[src]
fn parse<T: ?Sized>(
packet: &Packet<&'a T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) -> Result<Repr<'a>> where
T: AsRef<[u8]>,
[src]
packet: &Packet<&'a T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) -> Result<Repr<'a>> where
T: AsRef<[u8]>,
Parse an User Datagram Protocol packet and return a high-level representation.
fn buffer_len(&self) -> usize
[src]
Return the length of a packet that will be emitted from this high-level representation.
fn emit<T: ?Sized>(
&self,
packet: &mut Packet<&mut T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) where
T: AsRef<[u8]> + AsMut<[u8]>,
[src]
&self,
packet: &mut Packet<&mut T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) where
T: AsRef<[u8]> + AsMut<[u8]>,
Emit a high-level representation into an User Datagram Protocol packet.
Trait Implementations
impl<'a> Debug for Repr<'a>
[src]
impl<'a> PartialEq for Repr<'a>
[src]
fn eq(&self, __arg_0: &Repr<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Repr<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> Eq for Repr<'a>
[src]
impl<'a> Clone for Repr<'a>
[src]
fn clone(&self) -> Repr<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more