Skip to main content

BBQueue

Struct BBQueue 

Source
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>

Source

pub fn new_with_storage(sto: S) -> Self

Create a new BBQueue with the given Storage impl

Source§

impl<S: ConstStorage, C: Coord, N: Notifier> BBQueue<S, C, N>

Source

pub const fn new() -> Self

Create a new BBQueue in a const context

Source§

impl<S: Storage, C: Coord, N: Notifier> BBQueue<S, C, N>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn capacity(&self) -> usize

Get the total capacity of the buffer, e.g. how much space is present in Storage

Trait Implementations§

Source§

impl<S: Storage, C: Coord, N: Notifier> BbqHandle for &BBQueue<S, C, N>

Source§

type Target = &BBQueue<S, C, N>

How we reference our BBQueue.
Source§

type Storage = S

How the DATA of our BBQueue is stored
Source§

type Coord = C

How the producers/consumers of this BBQueue coordinate
Source§

type Notifier = N

How we notify the producer/consumers of this BBQueue
Source§

fn bbq_ref(&self) -> Self::Target

Obtain a reference to the pointed-to BBQueue
Source§

fn stream_producer(&self) -> StreamProducer<Self>

Create a StreamProducer from our Target’s BBQueue. Read more
Source§

fn stream_consumer(&self) -> StreamConsumer<Self>

Create a StreamConsumer from our Target’s BBQueue. Read more
Source§

fn framed_producer<H: LenHeader>(&self) -> FramedProducer<Self, H>

Create a FramedProducer from our Target’s BBQueue. Read more
Source§

fn framed_consumer<H: LenHeader>(&self) -> FramedConsumer<Self, H>

Create a FramedConsumer from our Target’s BBQueue. Read more

Auto Trait Implementations§

§

impl<S, C, N> Freeze for BBQueue<S, C, N>
where S: Freeze, C: Freeze, N: Freeze,

§

impl<S, C, N> RefUnwindSafe for BBQueue<S, C, N>

§

impl<S, C, N> Send for BBQueue<S, C, N>
where S: Send, C: Send, N: Send,

§

impl<S, C, N> Sync for BBQueue<S, C, N>
where S: Sync, C: Sync, N: Sync,

§

impl<S, C, N> Unpin for BBQueue<S, C, N>
where S: Unpin, C: Unpin, N: Unpin,

§

impl<S, C, N> UnsafeUnpin for BBQueue<S, C, N>

§

impl<S, C, N> UnwindSafe for BBQueue<S, C, N>
where S: UnwindSafe, C: UnwindSafe, N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.