Initial node implementation #4

Merged
zack merged 51 commits from develop into master 2023-07-19 18:09:13 +00:00
10 changed files with 157 additions and 44 deletions
Showing only changes of commit 3719f81b35 - Show all commits

View File

@ -0,0 +1,15 @@
#![no_std]
use core::cell::Cell;
/// Provides a view only reference to a [Cell].
/// Useful alternative to `&Cell` when an API wants to control where a [Cell]s value can be set.
#[derive(Copy, Clone)]
pub struct CellView<'a, T: Copy>(&'a Cell<T>);
impl<'a, T: Copy> CellView<'a, T> {
#[inline]
pub fn get(self) -> T {
self.0.get()
}
}