diff options
| author | Robin Mueller <[email protected]> | 2025-07-09 14:21:19 +0200 |
|---|---|---|
| committer | Robin Mueller <[email protected]> | 2025-07-09 14:21:19 +0200 |
| commit | 42c8379c5a571aa76214cdd73ef05a2c720eeb6e (patch) | |
| tree | 08b99af66dc19f73ca0b2fae9f2835199d7bfe19 /embassy-sync | |
| parent | ca667f124f20825a0624ae3d6ef3de9def033d90 (diff) | |
some minor documentation fixes
Diffstat (limited to 'embassy-sync')
| -rw-r--r-- | embassy-sync/src/mutex.rs | 2 | ||||
| -rw-r--r-- | embassy-sync/src/pipe.rs | 8 | ||||
| -rw-r--r-- | embassy-sync/src/priority_channel.rs | 4 | ||||
| -rw-r--r-- | embassy-sync/src/pubsub/publisher.rs | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/embassy-sync/src/mutex.rs b/embassy-sync/src/mutex.rs index 7528a9f68..67c682704 100644 --- a/embassy-sync/src/mutex.rs +++ b/embassy-sync/src/mutex.rs | |||
| @@ -23,7 +23,7 @@ struct State { | |||
| 23 | 23 | ||
| 24 | /// Async mutex. | 24 | /// Async mutex. |
| 25 | /// | 25 | /// |
| 26 | /// The mutex is generic over a blocking [`RawMutex`](crate::blocking_mutex::raw::RawMutex). | 26 | /// The mutex is generic over a blocking [RawMutex]. |
| 27 | /// The raw mutex is used to guard access to the internal "is locked" flag. It | 27 | /// The raw mutex is used to guard access to the internal "is locked" flag. It |
| 28 | /// is held for very short periods only, while locking and unlocking. It is *not* held | 28 | /// is held for very short periods only, while locking and unlocking. It is *not* held |
| 29 | /// for the entire time the async Mutex is locked. | 29 | /// for the entire time the async Mutex is locked. |
diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs index 2598652d2..df3b28b45 100644 --- a/embassy-sync/src/pipe.rs +++ b/embassy-sync/src/pipe.rs | |||
| @@ -152,7 +152,7 @@ where | |||
| 152 | 152 | ||
| 153 | impl<'p, M, const N: usize> Unpin for ReadFuture<'p, M, N> where M: RawMutex {} | 153 | impl<'p, M, const N: usize> Unpin for ReadFuture<'p, M, N> where M: RawMutex {} |
| 154 | 154 | ||
| 155 | /// Future returned by [`Pipe::fill_buf`] and [`Reader::fill_buf`]. | 155 | /// Future returned by [`Reader::fill_buf`]. |
| 156 | #[must_use = "futures do nothing unless you `.await` or poll them"] | 156 | #[must_use = "futures do nothing unless you `.await` or poll them"] |
| 157 | pub struct FillBufFuture<'p, M, const N: usize> | 157 | pub struct FillBufFuture<'p, M, const N: usize> |
| 158 | where | 158 | where |
| @@ -587,7 +587,7 @@ where | |||
| 587 | } | 587 | } |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | /// Write-only access to a [`DynamicPipe`]. | 590 | /// Write-only access to the dynamic pipe. |
| 591 | pub struct DynamicWriter<'p> { | 591 | pub struct DynamicWriter<'p> { |
| 592 | pipe: &'p dyn DynamicPipe, | 592 | pipe: &'p dyn DynamicPipe, |
| 593 | } | 593 | } |
| @@ -657,7 +657,7 @@ where | |||
| 657 | } | 657 | } |
| 658 | } | 658 | } |
| 659 | 659 | ||
| 660 | /// Read-only access to a [`DynamicPipe`]. | 660 | /// Read-only access to a dynamic pipe. |
| 661 | pub struct DynamicReader<'p> { | 661 | pub struct DynamicReader<'p> { |
| 662 | pipe: &'p dyn DynamicPipe, | 662 | pipe: &'p dyn DynamicPipe, |
| 663 | } | 663 | } |
| @@ -742,7 +742,7 @@ where | |||
| 742 | } | 742 | } |
| 743 | } | 743 | } |
| 744 | 744 | ||
| 745 | /// Future returned by [`DynamicPipe::fill_buf`] and [`DynamicReader::fill_buf`]. | 745 | /// Future returned by [`DynamicReader::fill_buf`]. |
| 746 | #[must_use = "futures do nothing unless you `.await` or poll them"] | 746 | #[must_use = "futures do nothing unless you `.await` or poll them"] |
| 747 | pub struct DynamicFillBufFuture<'p> { | 747 | pub struct DynamicFillBufFuture<'p> { |
| 748 | pipe: Option<&'p dyn DynamicPipe>, | 748 | pipe: Option<&'p dyn DynamicPipe>, |
diff --git a/embassy-sync/src/priority_channel.rs b/embassy-sync/src/priority_channel.rs index 623c52993..a6fbe8def 100644 --- a/embassy-sync/src/priority_channel.rs +++ b/embassy-sync/src/priority_channel.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | //! A queue for sending values between asynchronous tasks. | 1 | //! A queue for sending values between asynchronous tasks. |
| 2 | //! | 2 | //! |
| 3 | //! Similar to a [`Channel`](crate::channel::Channel), however [`PriorityChannel`] sifts higher priority items to the front of the queue. | 3 | //! Similar to a [`Channel`](crate::channel::Channel), however [`PriorityChannel`] sifts higher priority items to the front of the queue. |
| 4 | //! Priority is determined by the `Ord` trait. Priority behavior is determined by the [`Kind`](heapless::binary_heap::Kind) parameter of the channel. | 4 | //! Priority is determined by the `Ord` trait. Priority behavior is determined by the [Kind] parameter of the channel. |
| 5 | 5 | ||
| 6 | use core::cell::RefCell; | 6 | use core::cell::RefCell; |
| 7 | use core::future::Future; | 7 | use core::future::Future; |
| @@ -473,7 +473,7 @@ where | |||
| 473 | /// received from the channel. | 473 | /// received from the channel. |
| 474 | /// | 474 | /// |
| 475 | /// Sent data may be reordered based on their priority within the channel. | 475 | /// Sent data may be reordered based on their priority within the channel. |
| 476 | /// For example, in a [`Max`](heapless::binary_heap::Max) [`PriorityChannel`] | 476 | /// For example, in a [Max][PriorityChannel] |
| 477 | /// containing `u32`'s, data sent in the following order `[1, 2, 3]` will be received as `[3, 2, 1]`. | 477 | /// containing `u32`'s, data sent in the following order `[1, 2, 3]` will be received as `[3, 2, 1]`. |
| 478 | pub struct PriorityChannel<M, T, K, const N: usize> | 478 | pub struct PriorityChannel<M, T, K, const N: usize> |
| 479 | where | 479 | where |
diff --git a/embassy-sync/src/pubsub/publisher.rs b/embassy-sync/src/pubsub/publisher.rs index 7a1ab66de..2af1a9334 100644 --- a/embassy-sync/src/pubsub/publisher.rs +++ b/embassy-sync/src/pubsub/publisher.rs | |||
| @@ -75,7 +75,7 @@ impl<'a, PSB: PubSubBehavior<T> + ?Sized, T: Clone> Pub<'a, PSB, T> { | |||
| 75 | self.channel.is_full() | 75 | self.channel.is_full() |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /// Create a [`futures::Sink`] adapter for this publisher. | 78 | /// Create a [futures_sink::Sink] adapter for this publisher. |
| 79 | #[inline] | 79 | #[inline] |
| 80 | pub const fn sink(&self) -> PubSink<'a, '_, PSB, T> { | 80 | pub const fn sink(&self) -> PubSink<'a, '_, PSB, T> { |
| 81 | PubSink { publ: self, fut: None } | 81 | PubSink { publ: self, fut: None } |
