diff options
| author | Scott Mabin <[email protected]> | 2023-11-20 11:28:31 +0000 |
|---|---|---|
| committer | Scott Mabin <[email protected]> | 2023-11-20 11:28:31 +0000 |
| commit | 454828accbfa3eecfbe782a6a23435c7a01ee29b (patch) | |
| tree | 83361bd7931bed85979d4d75ca27295187fe8a6d /embassy-sync/src/channel.rs | |
| parent | 5a60024af71b70c059d4a2a2eacdfd7f73a3398d (diff) | |
revert module changes, reexport heapless relevant items
Diffstat (limited to 'embassy-sync/src/channel.rs')
| -rw-r--r-- | embassy-sync/src/channel.rs | 8 |
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; | |||
| 29 | use crate::blocking_mutex::Mutex; | 29 | use crate::blocking_mutex::Mutex; |
| 30 | use crate::waitqueue::WakerRegistration; | 30 | use crate::waitqueue::WakerRegistration; |
| 31 | 31 | ||
| 32 | pub mod priority; | ||
| 33 | |||
| 34 | /// Send-only access to a [`Channel`]. | 32 | /// Send-only access to a [`Channel`]. |
| 35 | pub struct Sender<'ch, M, T, const N: usize> | 33 | pub struct Sender<'ch, M, T, const N: usize> |
| 36 | where | 34 | where |
| @@ -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. |
| 80 | pub struct DynamicSender<'ch, T> { | 78 | pub struct DynamicSender<'ch, T> { |
| 81 | channel: &'ch dyn DynamicChannel<T>, | 79 | pub(crate) channel: &'ch dyn DynamicChannel<T>, |
| 82 | } | 80 | } |
| 83 | 81 | ||
| 84 | impl<'ch, T> Clone for DynamicSender<'ch, T> { | 82 | impl<'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. |
| 180 | pub struct DynamicReceiver<'ch, T> { | 178 | pub struct DynamicReceiver<'ch, T> { |
| 181 | channel: &'ch dyn DynamicChannel<T>, | 179 | pub(crate) channel: &'ch dyn DynamicChannel<T>, |
| 182 | } | 180 | } |
| 183 | 181 | ||
| 184 | impl<'ch, T> Clone for DynamicReceiver<'ch, T> { | 182 | impl<'ch, T> Clone for DynamicReceiver<'ch, T> { |
| @@ -323,7 +321,7 @@ impl<'ch, T> Future for DynamicSendFuture<'ch, T> { | |||
| 323 | 321 | ||
| 324 | impl<'ch, T> Unpin for DynamicSendFuture<'ch, T> {} | 322 | impl<'ch, T> Unpin for DynamicSendFuture<'ch, T> {} |
| 325 | 323 | ||
| 326 | trait DynamicChannel<T> { | 324 | pub(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>; |
