Struct freertos_rs::QueuePublisher
[−]
[src]
pub struct QueuePublisher<T: Sized + Copy> { /* fields omitted */ }
A pub-sub queue. An item sent to the publisher is sent to every subscriber.
Methods
impl<T: Sized + Copy> QueuePublisher<T>
[src]
fn new() -> Result<QueuePublisher<T>, FreeRtosError>
Create a new publisher
fn send(&self, item: T, max_wait: Duration) -> usize
Send an item to every subscriber. Returns the number of subscribers that have received the item.
fn subscribe(
&self,
max_size: usize,
create_max_wait: Duration
) -> Result<QueueSubscriber<T>, FreeRtosError>
&self,
max_size: usize,
create_max_wait: Duration
) -> Result<QueueSubscriber<T>, FreeRtosError>
Subscribe to this publisher. Can accept a fixed amount of items.
Trait Implementations
impl<T: Sized + Copy> Clone for QueuePublisher<T>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more