pub struct UdpHeader(/* private fields */);
Implementations§
source§impl UdpHeader
impl UdpHeader
pub fn with_bytes(bytes: Bytes) -> Result<(UdpHeader, Bytes)>
pub fn len() -> usize
pub fn src(&self) -> u16
pub fn dest(&self) -> u16
pub fn udp_len(&self) -> usize
pub fn data_len(&self) -> Option<usize>
pub fn checksum_valid<V: Iterator<Item = u16>>( &self, header: &IpHeader, data: V ) -> bool
pub fn calculated_checksum<V: Iterator<Item = u16>>( &self, header: &IpHeader, data: V ) -> u16
pub fn set_src(&mut self, src: u16)
pub fn set_dest(&mut self, dest: u16)
pub fn set_udp_len(&mut self, len: usize)
pub fn set_data_len(&mut self, len: usize)
pub fn calculate_checksum<V: Iterator<Item = u16>>( &mut self, header: &IpHeader, data: V )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UdpHeader
impl !RefUnwindSafe for UdpHeader
impl !Send for UdpHeader
impl !Sync for UdpHeader
impl Unpin for UdpHeader
impl !UnwindSafe for UdpHeader
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