pub struct Socket { /* private fields */ }
Expand description

An AF_XDP socket.

More details can be found in the docs

Implementations

Create and bind a new AF_XDP socket to a given interface and queue id using the underlying UMEM.

May require root permissions to create successfully.

Whether you can expect the returned Option<(FillQueue, CompQueue)> to be Some or None depends on a couple of things:

  1. If the Umem is currently shared (i.e. being used for >=1 AF_XDP sockets elsewhere):
  • If the (if_name, queue_id) pair is not bound to, expect Some.

  • If the (if_name, queue_id) pair is bound to, expect None and use the FillQueue and CompQueue originally returned for this pair.

  1. If the Umem is not currently shared, expect Some.

For further details on using a shared Umem please see the docs.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.