Struct NetlinkFlags

Source
pub struct NetlinkFlags(/* private fields */);
Expand description

Represent the flags field in a netlink packet header.

Implementations§

Source§

impl NetlinkFlags

Source

pub fn new() -> Self

Create a new empty flags field (no flag is set)

Source

pub fn set_request(&mut self) -> &mut Self

Set the NLM_F_REQUEST flag

Source

pub fn has_request(self) -> bool

Check if the NLM_F_REQUEST flag is set

Source

pub fn set_multipart(&mut self) -> &mut Self

Set the NLM_F_MULTIPART flag

Source

pub fn has_multipart(self) -> bool

Check if the NLM_F_MULTIPART flag is set

Source

pub fn set_ack(&mut self) -> &mut Self

Set the NLM_F_ACK flag

Source

pub fn has_ack(self) -> bool

Check if the NLM_F_ACK flag is set

Source

pub fn set_echo(&mut self) -> &mut Self

Set the NLM_F_ECHO flag

Source

pub fn has_echo(self) -> bool

Check if the NLM_F_ECHO flag is set

Source

pub fn set_dump_intr(&mut self) -> &mut Self

Set the NLM_F_DUMP_INTR flag

Source

pub fn has_dump_intr(self) -> bool

Check if the NLM_F_DUMP_INTR flag is set

Source

pub fn set_dump_filterd(&mut self) -> &mut Self

Set the NLM_F_DUMP_FILTERED flag

Source

pub fn has_dump_filterd(self) -> bool

Check if the NLM_F_DUMP_FILTERED flag is set

Source

pub fn set_root(&mut self) -> &mut Self

Set the NLM_F_ROOT flag

Source

pub fn has_root(self) -> bool

Check if the NLM_F_ROOT flag is set

Source

pub fn set_match(&mut self) -> &mut Self

Set the NLM_F_MATCH flag

Source

pub fn has_match(self) -> bool

Check if the NLM_F_MATCH flag is set

Source

pub fn set_atomic(&mut self) -> &mut Self

Set the NLM_F_ATOMIC flag

Source

pub fn has_atomic(self) -> bool

Check if the NLM_F_ATOMIC flag is set

Source

pub fn set_dump(&mut self) -> &mut Self

Set the NLM_F_DUMP flag

Source

pub fn has_dump(self) -> bool

Check if the NLM_F_DUMP flag is set

Source

pub fn set_replace(&mut self) -> &mut Self

Set the NLM_F_REPLACE flag

Source

pub fn has_replace(self) -> bool

Check if the NLM_F_REPLACE flag is set

Source

pub fn set_excl(&mut self) -> &mut Self

Set the NLM_F_EXCL flag

Source

pub fn has_excl(self) -> bool

Check if the NLM_F_EXCL flag is set

Source

pub fn set_create(&mut self) -> &mut Self

Set the NLM_F_CREATE flag

Source

pub fn has_create(self) -> bool

Check if the NLM_F_CREATE flag is set

Source

pub fn set_append(&mut self) -> &mut Self

Set the NLM_F_APPEND flag

Source

pub fn has_append(self) -> bool

Check if the NLM_F_APPEND flag is set

Source

pub fn set_nonrec(&mut self) -> &mut Self

Set the NLM_F_NONREC flag

Source

pub fn has_nonrec(self) -> bool

Check if the NLM_F_NONREC flag is set

Source

pub fn set_ack_tvls(&mut self) -> &mut Self

Set the NLM_F_ACK_TLVS flag

Source

pub fn has_ack_tvls(self) -> bool

Check if the NLM_F_ACK_TLVS flag is set

Source

pub fn set_capped(&mut self) -> &mut Self

Set the NLM_F_CAPPED flag

Source

pub fn has_capped(self) -> bool

Check if the NLM_F_CAPPED flag is set

Trait Implementations§

Source§

impl Clone for NetlinkFlags

Source§

fn clone(&self) -> NetlinkFlags

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NetlinkFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NetlinkFlags

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a> From<&'a NetlinkFlags> for u16

Source§

fn from(flags: &'a NetlinkFlags) -> u16

Converts to this type from the input type.
Source§

impl From<NetlinkFlags> for u16

Source§

fn from(flags: NetlinkFlags) -> u16

Converts to this type from the input type.
Source§

impl From<u16> for NetlinkFlags

Source§

fn from(flags: u16) -> Self

Converts to this type from the input type.
Source§

impl Hash for NetlinkFlags

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for NetlinkFlags

Source§

fn eq(&self, other: &NetlinkFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for NetlinkFlags

Source§

impl Eq for NetlinkFlags

Source§

impl StructuralPartialEq for NetlinkFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.