I have an embassy task that takes an embassy BufferedUart<'a, _>
. Embassy tasks require all parameters to have a lifetime of 'static. Because the BufferedUart must have a static lifetime, and the two &mut [u8;_]
buffers must have the same lifetime as the BufferedUart, I believe I need static &mut [u8;_]
buffers.
I am not sure how to get this in safe rust. I will only use these references in the new()
function of the BufferedUart, so I believe there should be a way to prove to the compiler that this is safe.
3 posts - 2 participants