pub enum CellType {
Ordinary,
PrunedBranch,
LibraryReference,
MerkleProof,
MerkleUpdate,
}
Expand description
Well-formed cell type.
Variants§
Ordinary
Cell of this type just stores data and references.
PrunedBranch
Exotic cell which was pruned from the original tree of cells when a Merkle proof has been created.
LibraryReference
Exotic cell with a reference to the cell with a library.
MerkleProof
Exotic cell with one hash and one reference.
MerkleUpdate
Exotic cell with two hashes and two references.
Implementations§
Source§impl CellType
impl CellType
Sourcepub const fn is_merkle(self) -> bool
pub const fn is_merkle(self) -> bool
Returns whether this cell type is Merkle proof or Merkle update.
Sourcepub const fn is_pruned_branch(self) -> bool
pub const fn is_pruned_branch(self) -> bool
Returns whether the cell is a pruned branch
Sourcepub const fn from_byte_exotic(byte: u8) -> Option<Self>
pub const fn from_byte_exotic(byte: u8) -> Option<Self>
Decodes exotic cell type from byte.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CellType
impl<'de> Deserialize<'de> for CellType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for CellType
impl Eq for CellType
impl StructuralPartialEq for CellType
Auto Trait Implementations§
impl Freeze for CellType
impl RefUnwindSafe for CellType
impl Send for CellType
impl Sync for CellType
impl Unpin for CellType
impl UnwindSafe for CellType
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<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
Compares
self
to key
and returns true
if they are equal.