pub enum IpHeader {
V4(Ipv4Header),
V6(Ipv6Header),
}
Variants§
Implementations§
source§impl IpHeader
impl IpHeader
pub fn with_bytes(bytes: Bytes) -> Result<(IpHeader, Bytes)>
pub fn src(&self) -> IpAddr
pub fn dest(&self) -> IpAddr
pub fn len(&self) -> usize
pub fn total_len(&self) -> Option<usize>
pub fn pseudo_iter(&self, len: usize) -> Chain<PairIter, IntoIter<u16>>
pub fn next(&self) -> IpProto
pub fn set_total_len(&mut self, len: usize)
pub fn set_next(&mut self, proto: IpProto)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IpHeader
impl !RefUnwindSafe for IpHeader
impl !Send for IpHeader
impl !Sync for IpHeader
impl Unpin for IpHeader
impl !UnwindSafe for IpHeader
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