#[repr(C, packed(1))]pub struct NetworkLayerFilter {
pub union_selector: u32,
pub network_layer: NetworkLayerFilterUnion,
}
Expand description
A Rust struct that represents a network layer filter.
Rust equivalent for _NETWORK_LAYER_FILTER.
Fields§
§union_selector: u32
union_selector: A field that determines the type of the network layer filter. Set to IPV4 for IpV4Filter, and IPV6 for IpV6Filter.
network_layer: NetworkLayerFilterUnion
network_layer: A union that holds either an IpV4Filter or an IpV6Filter, depending on the value of the union_selector field.
Implementations§
Source§impl NetworkLayerFilter
Creates a new NetworkLayerFilter
instance.
impl NetworkLayerFilter
Creates a new NetworkLayerFilter
instance.
§Arguments
union_selector
- A field that determines the type of the network layer filter.network_layer
- A union that holds either an IpV4Filter or an IpV6Filter.
§Returns
- A new
NetworkLayerFilter
instance.
pub fn new(union_selector: u32, network_layer: NetworkLayerFilterUnion) -> Self
Trait Implementations§
Source§impl Clone for NetworkLayerFilter
impl Clone for NetworkLayerFilter
Source§fn clone(&self) -> NetworkLayerFilter
fn clone(&self) -> NetworkLayerFilter
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 Default for NetworkLayerFilter
impl Default for NetworkLayerFilter
Source§fn default() -> NetworkLayerFilter
fn default() -> NetworkLayerFilter
Returns the “default value” for a type. Read more
impl Copy for NetworkLayerFilter
Auto Trait Implementations§
impl Freeze for NetworkLayerFilter
impl RefUnwindSafe for NetworkLayerFilter
impl Send for NetworkLayerFilter
impl Sync for NetworkLayerFilter
impl Unpin for NetworkLayerFilter
impl UnwindSafe for NetworkLayerFilter
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