mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 12:20:37 +00:00
Merge pull request #4385 from us-irs/some-minor-doc-fixes
some minor documentation fixes
This commit is contained in:
commit
ba5aea8e60
@ -23,7 +23,7 @@ struct State {
|
||||
|
||||
/// Async mutex.
|
||||
///
|
||||
/// The mutex is generic over a blocking [`RawMutex`](crate::blocking_mutex::raw::RawMutex).
|
||||
/// The mutex is generic over a blocking [`RawMutex`].
|
||||
/// The raw mutex is used to guard access to the internal "is locked" flag. It
|
||||
/// is held for very short periods only, while locking and unlocking. It is *not* held
|
||||
/// for the entire time the async Mutex is locked.
|
||||
|
@ -152,7 +152,7 @@ where
|
||||
|
||||
impl<'p, M, const N: usize> Unpin for ReadFuture<'p, M, N> where M: RawMutex {}
|
||||
|
||||
/// Future returned by [`Pipe::fill_buf`] and [`Reader::fill_buf`].
|
||||
/// Future returned by [`Reader::fill_buf`].
|
||||
#[must_use = "futures do nothing unless you `.await` or poll them"]
|
||||
pub struct FillBufFuture<'p, M, const N: usize>
|
||||
where
|
||||
@ -587,7 +587,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Write-only access to a [`DynamicPipe`].
|
||||
/// Write-only access to the dynamic pipe.
|
||||
pub struct DynamicWriter<'p> {
|
||||
pipe: &'p dyn DynamicPipe,
|
||||
}
|
||||
@ -657,7 +657,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Read-only access to a [`DynamicPipe`].
|
||||
/// Read-only access to a dynamic pipe.
|
||||
pub struct DynamicReader<'p> {
|
||||
pipe: &'p dyn DynamicPipe,
|
||||
}
|
||||
@ -742,7 +742,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Future returned by [`DynamicPipe::fill_buf`] and [`DynamicReader::fill_buf`].
|
||||
/// Future returned by [`DynamicReader::fill_buf`].
|
||||
#[must_use = "futures do nothing unless you `.await` or poll them"]
|
||||
pub struct DynamicFillBufFuture<'p> {
|
||||
pipe: Option<&'p dyn DynamicPipe>,
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! A queue for sending values between asynchronous tasks.
|
||||
//!
|
||||
//! Similar to a [`Channel`](crate::channel::Channel), however [`PriorityChannel`] sifts higher priority items to the front of the queue.
|
||||
//! Priority is determined by the `Ord` trait. Priority behavior is determined by the [`Kind`](heapless::binary_heap::Kind) parameter of the channel.
|
||||
//! Priority is determined by the `Ord` trait. Priority behavior is determined by the [`Kind`] parameter of the channel.
|
||||
|
||||
use core::cell::RefCell;
|
||||
use core::future::Future;
|
||||
@ -473,7 +473,7 @@ where
|
||||
/// received from the channel.
|
||||
///
|
||||
/// Sent data may be reordered based on their priority within the channel.
|
||||
/// For example, in a [`Max`](heapless::binary_heap::Max) [`PriorityChannel`]
|
||||
/// For example, in a [`Max`] [`PriorityChannel`]
|
||||
/// containing `u32`'s, data sent in the following order `[1, 2, 3]` will be received as `[3, 2, 1]`.
|
||||
pub struct PriorityChannel<M, T, K, const N: usize>
|
||||
where
|
||||
|
@ -75,7 +75,7 @@ impl<'a, PSB: PubSubBehavior<T> + ?Sized, T: Clone> Pub<'a, PSB, T> {
|
||||
self.channel.is_full()
|
||||
}
|
||||
|
||||
/// Create a [`futures::Sink`] adapter for this publisher.
|
||||
/// Create a [`futures_sink::Sink`] adapter for this publisher.
|
||||
#[inline]
|
||||
pub const fn sink(&self) -> PubSink<'a, '_, PSB, T> {
|
||||
PubSink { publ: self, fut: None }
|
||||
|
Loading…
x
Reference in New Issue
Block a user