Skip to main content

OpGroupDo

Struct OpGroupDo 

Source
pub struct OpGroupDo<'r> { /* private fields */ }
Available on crate feature net-shaper only.
Expand description

Create or update a scheduling group, attaching the specified @leaves shapers under the specified node identified by @handle. The @leaves shapers scope must be @queue and the node shaper scope must be either @node or @netdev. When the node shaper has @node scope, if the @handle @id is not specified, a new shaper of such scope is created, otherwise the specified node must already exist. When updating an existing node shaper, the specified @leaves are added to the existing node; such node will also retain any preexisting leave. The @parent handle for a new node shaper defaults to the parent of all the leaves, provided all the leaves share the same parent. Otherwise @parent handle must be specified. The user can optionally provide shaping attributes for the node shaper. The operation is atomic, on failure no change is applied to the device shaping configuration, otherwise the @node shaper full identifier, comprising @binding and @handle, is provided as the reply.

Flags: admin-perm

Request attributes:

Reply attributes:

Implementations§

Source§

impl<'r> OpGroupDo<'r>

Source

pub fn new(request: Request<'r>) -> Self

Source

pub fn encode_request<'buf>( buf: &'buf mut Vec<u8>, ) -> PushNetShaper<&'buf mut Vec<u8>>

Source

pub fn encode(&mut self) -> PushNetShaper<&mut Vec<u8>>

Source

pub fn into_encoder(self) -> PushNetShaper<RequestBuf<'r>>

Source

pub fn decode_request<'a>(buf: &'a [u8]) -> IterableNetShaper<'a>

Trait Implementations§

Source§

impl<'r> Debug for OpGroupDo<'r>

Source§

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

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

impl NetlinkRequest for OpGroupDo<'_>

Source§

type ReplyType<'buf> = IterableNetShaper<'buf>

Source§

fn protocol(&self) -> Protocol

Netlink protocol to use
Source§

fn flags(&self) -> u16

Additional flags specified in the message header
Source§

fn payload(&self) -> &[u8]

Encoded payload of the message (without message header)
Source§

fn decode_reply<'buf>(buf: &'buf [u8]) -> Self::ReplyType<'buf>

Source§

fn lookup( buf: &[u8], offset: usize, missing_type: Option<u16>, ) -> (Vec<(&'static str, usize)>, Option<&'static str>)

Lookup an attribute and it’s parents in the request payload by offset

Auto Trait Implementations§

§

impl<'r> !UnwindSafe for OpGroupDo<'r>

§

impl<'r> Freeze for OpGroupDo<'r>

§

impl<'r> RefUnwindSafe for OpGroupDo<'r>

§

impl<'r> Send for OpGroupDo<'r>

§

impl<'r> Sync for OpGroupDo<'r>

§

impl<'r> Unpin for OpGroupDo<'r>

§

impl<'r> UnsafeUnpin for OpGroupDo<'r>

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> 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, 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.