Struct windivert_sys::ChecksumFlags
source · #[repr(transparent)]pub struct ChecksumFlags(_);
Expand description
Wrapper helper struct around u64.
The type uses transparent representation to enforce using the provided methods to set the values of the flags used by WinDivertHelperCalcChecksums()
The different flag values are:
no_ip
: Do not calculate the IPv4 checksum.no_icmp
: Do not calculate the ICMP checksum.no_icmpv6
: Do not calculate the ICMPv6 checksum.no_tcp
: Do not calculate the TCP checksum.no_udp
: Do not calculate the UDP checksum.
Implementations§
source§impl ChecksumFlags
impl ChecksumFlags
sourcepub const fn unset_no_ip(self) -> Self
pub const fn unset_no_ip(self) -> Self
Unsets no_ip
flag
sourcepub fn set_no_ip_value(&mut self, value: bool)
pub fn set_no_ip_value(&mut self, value: bool)
Sets no_ip
flag to value
.
sourcepub const fn set_no_icmp(self) -> Self
pub const fn set_no_icmp(self) -> Self
Sets no_icmp
flag
sourcepub const fn unset_no_icmp(self) -> Self
pub const fn unset_no_icmp(self) -> Self
Unsets no_icmp
flag
sourcepub fn set_no_icmp_value(&mut self, value: bool)
pub fn set_no_icmp_value(&mut self, value: bool)
Sets no_icmp
flag to value
.
sourcepub const fn set_no_icmpv6(self) -> Self
pub const fn set_no_icmpv6(self) -> Self
Sets no_icmpv6
flag
sourcepub const fn unset_no_icmpv6(self) -> Self
pub const fn unset_no_icmpv6(self) -> Self
Unsets no_icmpv6
flag
sourcepub fn set_no_icmpv6_value(&mut self, value: bool)
pub fn set_no_icmpv6_value(&mut self, value: bool)
Sets no_icmpv6
flag to value
.
sourcepub const fn set_no_tcp(self) -> Self
pub const fn set_no_tcp(self) -> Self
Sets no_tcp
flag
sourcepub const fn unset_no_tcp(self) -> Self
pub const fn unset_no_tcp(self) -> Self
Unsets no_tcp
flag
sourcepub fn set_no_tcp_value(&mut self, value: bool)
pub fn set_no_tcp_value(&mut self, value: bool)
Sets no_tcp
flag to value
.
sourcepub const fn set_no_udp(self) -> Self
pub const fn set_no_udp(self) -> Self
Sets no_udp
flag
sourcepub const fn unset_no_udp(self) -> Self
pub const fn unset_no_udp(self) -> Self
Unsets no_udp
flag
sourcepub fn set_no_udp_value(&mut self, value: bool)
pub fn set_no_udp_value(&mut self, value: bool)
Sets no_udp
flag to value
.
Trait Implementations§
source§impl Clone for ChecksumFlags
impl Clone for ChecksumFlags
source§fn clone(&self) -> ChecksumFlags
fn clone(&self) -> ChecksumFlags
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChecksumFlags
impl Debug for ChecksumFlags
source§impl Default for ChecksumFlags
impl Default for ChecksumFlags
source§fn default() -> ChecksumFlags
fn default() -> ChecksumFlags
Returns the “default value” for a type. Read more
source§impl From<ChecksumFlags> for u64
impl From<ChecksumFlags> for u64
source§fn from(flags: ChecksumFlags) -> Self
fn from(flags: ChecksumFlags) -> Self
Converts to this type from the input type.
impl Copy for ChecksumFlags
Auto Trait Implementations§
impl RefUnwindSafe for ChecksumFlags
impl Send for ChecksumFlags
impl Sync for ChecksumFlags
impl Unpin for ChecksumFlags
impl UnwindSafe for ChecksumFlags
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