pub enum MissingOr<T> {
Materialized(T),
Missing([u8; 32]),
}Expand description
Either a fully materialized value or a precomputed hash placeholder.
Variants§
Trait Implementations§
Source§impl<T: Decode> Decode for MissingOr<T>
impl<T: Decode> Decode for MissingOr<T>
Source§fn is_ssz_fixed_len() -> bool
fn is_ssz_fixed_len() -> bool
true iff this type is fixed-length.Source§fn ssz_fixed_len() -> usize
fn ssz_fixed_len() -> usize
Number of bytes this type occupies in the fixed-length portion of a
container encoding. Variable-length types return
BYTES_PER_LENGTH_OFFSET.Source§fn from_ssz_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
fn from_ssz_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
Decode a full instance from
bytes, rejecting trailing input.Source§impl<T: Encode> Encode for MissingOr<T>
impl<T: Encode> Encode for MissingOr<T>
Source§fn is_ssz_fixed_len() -> bool
fn is_ssz_fixed_len() -> bool
true iff this type is fixed-length (no variable-length fields).Source§fn ssz_fixed_len() -> usize
fn ssz_fixed_len() -> usize
Number of bytes this type occupies in the fixed-length portion of a
container encoding. For variable-length types this returns
BYTES_PER_LENGTH_OFFSET (i.e. the size of the offset slot).Source§fn ssz_bytes_len(&self) -> usize
fn ssz_bytes_len(&self) -> usize
Total size of
self when serialized.Source§fn ssz_append(&self, buf: &mut Vec<u8>)
fn ssz_append(&self, buf: &mut Vec<u8>)
Append the encoding of
self to buf.Source§fn is_basic_type() -> bool
fn is_basic_type() -> bool
true for “basic” SSZ types (uintN, bool), which pack adjacent
elements into shared 32-byte chunks for merkleization. Composite
types (containers, lists, structs) return false (the default).Source§impl<T: HashTreeRoot> HashTreeRoot for MissingOr<T>
impl<T: HashTreeRoot> HashTreeRoot for MissingOr<T>
impl<T: Eq> Eq for MissingOr<T>
Auto Trait Implementations§
impl<T> Freeze for MissingOr<T>where
T: Freeze,
impl<T> RefUnwindSafe for MissingOr<T>where
T: RefUnwindSafe,
impl<T> Send for MissingOr<T>where
T: Send,
impl<T> Sync for MissingOr<T>where
T: Sync,
impl<T> Unpin for MissingOr<T>where
T: Unpin,
impl<T> UnsafeUnpin for MissingOr<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MissingOr<T>where
T: UnwindSafe,
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