Struct libbpf_rs::RingBufferBuilder[][src]

pub struct RingBufferBuilder { /* fields omitted */ }
Expand description

Builds RingBuffer instances.

ringbufs are a special kind of Map, used to transfer data between Programs and userspace. As of Linux 5.8, the ringbuf map is now preferred over the perf buffer.

Implementations

Add a new ringbuf map and associated callback to this ring buffer manager. The callback should take one argument, a slice of raw bytes, and return an i32.

Non-zero return values in the callback will stop ring buffer consumption early.

The callback provides a raw byte slice. You may find libraries such as plain helpful.

Build a new RingBuffer. Must have added at least one ringbuf.

Trait Implementations

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

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.