pub struct BBQueue<S, C, N> { /* private fields */ }Expand description
A standard bbqueue
Implementations§
Source§impl<S: Storage, C: Coord, N: Notifier> BBQueue<S, C, N>
impl<S: Storage, C: Coord, N: Notifier> BBQueue<S, C, N>
Sourcepub fn new_with_storage(sto: S) -> Self
pub fn new_with_storage(sto: S) -> Self
Source§impl<S: Storage, C: Coord, N: Notifier> BBQueue<S, C, N>
impl<S: Storage, C: Coord, N: Notifier> BBQueue<S, C, N>
Sourcepub const fn framed_producer(&self) -> FramedProducer<&Self>
pub const fn framed_producer(&self) -> FramedProducer<&Self>
Create a new FramedProducer for this BBQueue
Although mixing stream and framed consumer/producers will not result in UB, it will also not work correctly.
Sourcepub const fn framed_consumer(&self) -> FramedConsumer<&Self>
pub const fn framed_consumer(&self) -> FramedConsumer<&Self>
Create a new FramedConsumer for this BBQueue
Although mixing stream and framed consumer/producers will not result in UB, it will also not work correctly.
Sourcepub const fn stream_producer(&self) -> StreamProducer<&Self>
pub const fn stream_producer(&self) -> StreamProducer<&Self>
Create a new StreamProducer for this BBQueue
Although mixing stream and framed consumer/producers will not result in UB, it will also not work correctly.
Sourcepub const fn stream_consumer(&self) -> StreamConsumer<&Self>
pub const fn stream_consumer(&self) -> StreamConsumer<&Self>
Create a new StreamConsumer for this BBQueue
Although mixing stream and framed consumer/producers will not result in UB, it will also not work correctly.
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Get the total capacity of the buffer, e.g. how much space is present in Storage
Sourcepub fn storage(&self) -> &S
pub fn storage(&self) -> &S
Get access to the internal storage implementation details
NOTE: Although this method is safe, use of the Storage methods are not.
You should never attempt to access or modify the underlying data contained
in a storage implementation while the bbqueue is live. That will IMMEDIATELY
lead to undefined behavior.
As far as I am aware, the only reasonable use for this is for cases where you
have a custom Storage implementation that has unique teardown/drop in place
requirements. Treat any uses of this function with extreme caution!