pub struct RetentionStorage<const SIZE: usize> { /* private fields */ }unstable only.Expand description
Storage for RetentionMemory.
This storage must be placed in #[ram(reclaimed, unstable(zeroed))], then a static mutable
reference to RetentionMemory can be taken out of it.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Implementations§
Source§impl<const SIZE: usize> RetentionStorage<SIZE>
impl<const SIZE: usize> RetentionStorage<SIZE>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates storage for the retention memory.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn take(&'static self) -> &'static mut RetentionMemory<SIZE>
pub fn take(&'static self) -> &'static mut RetentionMemory<SIZE>
Takes the reference to the retention memory.
Can only be called once.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Trait Implementations§
Source§impl<const SIZE: usize> Default for RetentionStorage<SIZE>
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
impl<const SIZE: usize> Default for RetentionStorage<SIZE>
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.