pub struct StableCell<T: Storable, M: Memory = DefaultMemoryImpl> { /* private fields */ }Expand description
Governed upstream Cell; initialization and failures follow upstream contracts.
Implementations§
Source§impl<T: Storable, M: Memory> StableCell<T, M>
impl<T: Storable, M: Memory> StableCell<T, M>
Sourcepub fn new(memory: RuntimeMemory<M>, value: T) -> Self
pub fn new(memory: RuntimeMemory<M>, value: T) -> Self
Delegates to upstream Cell::new with the governed allocation.
Sourcepub fn init(memory: RuntimeMemory<M>, default_value: T) -> Self
pub fn init(memory: RuntimeMemory<M>, default_value: T) -> Self
Delegates to upstream Cell::init with the governed allocation.
Auto Trait Implementations§
impl<T, M = Rc<RefCell<Vec<u8>>>> !Freeze for StableCell<T, M>
impl<T, M = Rc<RefCell<Vec<u8>>>> !RefUnwindSafe for StableCell<T, M>
impl<T, M = Rc<RefCell<Vec<u8>>>> !Send for StableCell<T, M>
impl<T, M = Rc<RefCell<Vec<u8>>>> !Sync for StableCell<T, M>
impl<T, M = Rc<RefCell<Vec<u8>>>> !UnwindSafe for StableCell<T, M>
impl<T, M> Unpin for StableCell<T, M>
impl<T, M> UnsafeUnpin for StableCell<T, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more