pub struct StateCell {
pub data: StateValue,
pub auth: AuthToken,
pub lock: Option<CellLock>,
}
Expand description
Read-once access-controlled memory cell, defining destructible part of the contract state.
Fields§
§data: StateValue
Value stored in the memory cell.
auth: AuthToken
Token of authority controlling the access to the memory cell.
lock: Option<CellLock>
Additional (locking) conditions.
Trait Implementations§
Source§impl CommitEncode for StateCell
impl CommitEncode for StateCell
Source§type CommitmentId = MerkleHash
type CommitmentId = MerkleHash
Type of the resulting commitment.
Source§fn commit_encode(&self, engine: &mut CommitEngine)
fn commit_encode(&self, engine: &mut CommitEngine)
Encodes the data for the commitment by writing them directly into a
std::io::Write
writer instanceSource§impl<'de> Deserialize<'de> for StateCell
impl<'de> Deserialize<'de> for StateCell
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateCell, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateCell, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StateCell
impl Serialize for StateCell
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for StateCell
impl StrictDecode for StateCell
fn strict_decode(reader: &mut impl TypedRead) -> Result<StateCell, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for StateCell
impl StrictDumb for StateCell
fn strict_dumb() -> StateCell
Source§impl StrictEncode for StateCell
impl StrictEncode for StateCell
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictStruct for StateCell
impl StrictStruct for StateCell
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for StateCell
impl StrictType for StateCell
const STRICT_LIB_NAME: &'static str = LIB_NAME_ULTRASONIC
fn strict_name() -> Option<TypeName>
impl Copy for StateCell
impl Eq for StateCell
impl StrictProduct for StateCell
impl StructuralPartialEq for StateCell
Auto Trait Implementations§
impl Freeze for StateCell
impl RefUnwindSafe for StateCell
impl Send for StateCell
impl Sync for StateCell
impl Unpin for StateCell
impl UnwindSafe for StateCell
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CommitId for Twhere
T: CommitEncode,
impl<T> CommitId for Twhere
T: CommitEncode,
fn commit(&self) -> CommitEngine
Source§fn commit_id(&self) -> <T as CommitEncode>::CommitmentId
fn commit_id(&self) -> <T as CommitEncode>::CommitmentId
Performs commitment to client-side-validated data
Source§impl<T> CommitmentLayout for Twhere
T: CommitEncode + StrictDumb,
impl<T> CommitmentLayout for Twhere
T: CommitEncode + StrictDumb,
Source§fn commitment_layout() -> CommitLayout
fn commitment_layout() -> CommitLayout
Generate a descriptive commitment layout, which includes a description
of each encoded field and the used hashing strategies.
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.