pub struct RingBufferProducer<T: Sized> { /* fields omitted */ }
Produces bursts of messages to put into the ring buffer.
Request a space of a given count
in the ring buffer.
Returns a slice offset into the (external) ring buffer for which count
bytes are available.
Should be released with produce()
.
Slice data should be treated as uninitialized, not necessarily zero'd.
count
should not be zero.
count
should not exceed the buffer size.
Returns an Err if the producer could acquire a slice of the desired count
.
A wrapper around acquire, that retries progressively smaller count
s if acquire fails, eventually reducing to a count of 1
before giving up.
If it gives up, there will be values remaining in populate_with
on return.
All the other original values in populate_with
are moved into the ring buffer (and so are not dropped).
populate_with
can have a .len()
of zero.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static