Struct mpmc_ringbuf::core::MsgQueue

source ·
pub struct MsgQueue<T> { /* private fields */ }
Expand description

main struct for controlling buffer blocks Users should crate a new buffer block with fn add_producer, and explicitly delete the buffer blocks with fn delete_consumer If users want to add a producer and produce some data, make sure you call fn add_producer ahead, otherwise there are none data block for storing the data.

Implementations§

@TODO MsgQueue should manage the exist blocks for querying

only can call before using get_consumer and add_consumer

get_consumer won’t panic even buffer block doesn’t exist, system will check the matched block and create it when it doesn’t exist.

Trait Implementations§

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.