Make AppElementsContext clonable
@@ -26,6 +26,7 @@ use embassy::blocking_mutex::raw::NoopRawMutex;
use embassy::channel::mpsc::Sender as ChannelSender;
use heapless::Vec;
+#[derive(Clone)]
pub struct AppElementsContext {
pub(crate) sender: ChannelSender<'static, NoopRawMutex, OutboundPublishMessage, 3>,
pub(crate) address: UnicastAddress,
@@ -39,6 +40,10 @@ impl AppElementsContext {
_message: PhantomData,
}
}
+
+ pub fn address(&self) -> UnicastAddress {
+ self.address
+ }
}
#[derive(Clone)]
