pub struct AsyncRb<T, B: Rb<T>> { /* private fields */ }

Implementations§

Trait Implementations§

Returns capacity of the ring buffer. Read more
The number of items stored in the ring buffer.
The number of remaining free places in the buffer.
Returns a pair of slices which contain, in order, the contents of the ring buffer.
Returns a pair of mutable slices which contain, in order, the contents of the ring buffer.
Removes latest item from the ring buffer and returns it. Read more
Returns an iterator that removes items one by one from the ring buffer.
Returns a front-to-back iterator containing references to items in the ring buffer. Read more
Returns a front-to-back iterator that returns mutable references to items in the ring buffer. Read more
Removes exactly n items from the buffer and safely drops them. Read more
Removes all items from the buffer and safely drops them. Read more
Appends an item to the ring buffer. Read more
Pushes an item to the ring buffer overwriting the latest item if the buffer is full. Read more
Appends items from an iterator to the ring buffer. Elements that haven’t been added to the ring buffer remain in the iterator.
Appends items from an iterator to the ring buffer. Read more
Returns underlying raw ring buffer memory as slice. Read more
Capacity of the ring buffer. Read more
Head position.
Tail position.
Modulus for head and tail values. Read more
The number of items stored in the buffer at the moment.
The number of vacant places in the buffer at the moment.
Checks if the occupied range is empty.
Checks if the vacant range is empty.
Sets the new head position. Read more
Move head position by count items forward. Read more
Returns a pair of ranges of Self::occupied_slices location in underlying container.
Provides a direct mutable access to the ring buffer occupied memory. Read more
Removes items from the head of ring buffer and drops them. Read more
Sets the new tail position. Read more
Move tail position by count items forward. Read more
Returns a pair of ranges of Self::vacant_slices location in underlying container.
Provides a direct access to the ring buffer vacant memory. Returns a pair of slices of uninitialized memory, the second one may be empty. 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 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.