Added example and some defmt

This commit is contained in:
Dion Dokter
2022-06-21 15:47:20 +02:00
parent 1eec7e69f1
commit 78c546f356
2 changed files with 108 additions and 0 deletions

View File

@ -370,6 +370,7 @@ impl<T: Clone, const CAP: usize, const SUBS: usize, const PUBS: usize> PubSubSta
/// Error type for the [PubSubChannel]
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error {
/// All subscriber slots are used. To add another subscriber, first another subscriber must be dropped or
/// the capacity of the channels must be increased.
@ -404,6 +405,7 @@ pub trait PubSubBehavior<T> {
/// The result of the subscriber wait procedure
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum WaitResult<T> {
/// The subscriber did not receive all messages and lagged by the given amount of messages.
/// (This is the amount of messages that were missed)