aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/src/channel.rs
diff options
context:
space:
mode:
authorScott Mabin <[email protected]>2023-11-20 11:28:31 +0000
committerScott Mabin <[email protected]>2023-11-20 11:28:31 +0000
commit454828accbfa3eecfbe782a6a23435c7a01ee29b (patch)
tree83361bd7931bed85979d4d75ca27295187fe8a6d /embassy-sync/src/channel.rs
parent5a60024af71b70c059d4a2a2eacdfd7f73a3398d (diff)
revert module changes, reexport heapless relevant items
Diffstat (limited to 'embassy-sync/src/channel.rs')
-rw-r--r--embassy-sync/src/channel.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/embassy-sync/src/channel.rs b/embassy-sync/src/channel.rs
index 1843bbae0..ff7129303 100644
--- a/embassy-sync/src/channel.rs
+++ b/embassy-sync/src/channel.rs
@@ -29,8 +29,6 @@ use crate::blocking_mutex::raw::RawMutex;
29use crate::blocking_mutex::Mutex; 29use crate::blocking_mutex::Mutex;
30use crate::waitqueue::WakerRegistration; 30use crate::waitqueue::WakerRegistration;
31 31
32pub mod priority;
33
34/// Send-only access to a [`Channel`]. 32/// Send-only access to a [`Channel`].
35pub struct Sender<'ch, M, T, const N: usize> 33pub struct Sender<'ch, M, T, const N: usize>
36where 34where
@@ -78,7 +76,7 @@ where
78 76
79/// Send-only access to a [`Channel`] without knowing channel size. 77/// Send-only access to a [`Channel`] without knowing channel size.
80pub struct DynamicSender<'ch, T> { 78pub struct DynamicSender<'ch, T> {
81 channel: &'ch dyn DynamicChannel<T>, 79 pub(crate) channel: &'ch dyn DynamicChannel<T>,
82} 80}
83 81
84impl<'ch, T> Clone for DynamicSender<'ch, T> { 82impl<'ch, T> Clone for DynamicSender<'ch, T> {
@@ -178,7 +176,7 @@ where
178 176
179/// Receive-only access to a [`Channel`] without knowing channel size. 177/// Receive-only access to a [`Channel`] without knowing channel size.
180pub struct DynamicReceiver<'ch, T> { 178pub struct DynamicReceiver<'ch, T> {
181 channel: &'ch dyn DynamicChannel<T>, 179 pub(crate) channel: &'ch dyn DynamicChannel<T>,
182} 180}
183 181
184impl<'ch, T> Clone for DynamicReceiver<'ch, T> { 182impl<'ch, T> Clone for DynamicReceiver<'ch, T> {
@@ -323,7 +321,7 @@ impl<'ch, T> Future for DynamicSendFuture<'ch, T> {
323 321
324impl<'ch, T> Unpin for DynamicSendFuture<'ch, T> {} 322impl<'ch, T> Unpin for DynamicSendFuture<'ch, T> {}
325 323
326trait DynamicChannel<T> { 324pub(crate) trait DynamicChannel<T> {
327 fn try_send_with_context(&self, message: T, cx: Option<&mut Context<'_>>) -> Result<(), TrySendError<T>>; 325 fn try_send_with_context(&self, message: T, cx: Option<&mut Context<'_>>) -> Result<(), TrySendError<T>>;
328 326
329 fn try_receive_with_context(&self, cx: Option<&mut Context<'_>>) -> Result<T, TryReceiveError>; 327 fn try_receive_with_context(&self, cx: Option<&mut Context<'_>>) -> Result<T, TryReceiveError>;