pub struct ArcBBQueue<S, C, N>(/* private fields */);Expand description
A BBQueue wrapped in an Arc
Implementations§
Source§impl<S: Storage, C: Coord, N: Notifier> ArcBBQueue<S, C, N>
impl<S: Storage, C: Coord, N: Notifier> ArcBBQueue<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> ArcBBQueue<S, C, N>
impl<S: Storage, C: Coord, N: Notifier> ArcBBQueue<S, C, N>
Sourcepub fn framed_producer(&self) -> FramedProducer<Arc<BBQueue<S, C, N>>>
pub fn framed_producer(&self) -> FramedProducer<Arc<BBQueue<S, C, N>>>
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 fn framed_consumer(&self) -> FramedConsumer<Arc<BBQueue<S, C, N>>>
pub fn framed_consumer(&self) -> FramedConsumer<Arc<BBQueue<S, C, N>>>
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 fn stream_producer(&self) -> StreamProducer<Arc<BBQueue<S, C, N>>>
pub fn stream_producer(&self) -> StreamProducer<Arc<BBQueue<S, C, N>>>
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 fn stream_consumer(&self) -> StreamConsumer<Arc<BBQueue<S, C, N>>>
pub fn stream_consumer(&self) -> StreamConsumer<Arc<BBQueue<S, C, N>>>
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!