Struct ethereum_forkid::ForkHash
source · [−]pub struct ForkHash(pub u32);
Expand description
CRC32
hash of all previous forks starting from genesis block.
Tuple Fields
0: u32
Trait Implementations
sourceimpl Add<u64> for ForkHash
impl Add<u64> for ForkHash
type Output = Self
type Output = Self
The resulting type after applying the +
operator.
sourcefn add(self, block: BlockNumber) -> Self
fn add(self, block: BlockNumber) -> Self
Performs the +
operation. Read more
sourceimpl AddAssign<u64> for ForkHash
impl AddAssign<u64> for ForkHash
sourcefn add_assign(&mut self, block: BlockNumber)
fn add_assign(&mut self, block: BlockNumber)
Performs the +=
operation. Read more
sourceimpl Decodable for ForkHash
impl Decodable for ForkHash
sourcefn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>
fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>
Decode a value from RLP bytes
sourceimpl MallocSizeOf for ForkHash
impl MallocSizeOf for ForkHash
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
If T::size_of
is a constant, consider implementing constant_size
as well. Read more
sourcefn constant_size() -> Option<usize>
fn constant_size() -> Option<usize>
Used to optimize MallocSizeOf
implementation for collections
like Vec
and HashMap
to avoid iterating over them unnecessarily.
The Self: Sized
bound is for object safety. Read more
impl Copy for ForkHash
impl Eq for ForkHash
impl StructuralEq for ForkHash
impl StructuralPartialEq for ForkHash
Auto Trait Implementations
impl RefUnwindSafe for ForkHash
impl Send for ForkHash
impl Sync for ForkHash
impl Unpin for ForkHash
impl UnwindSafe for ForkHash
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> MallocSizeOfExt for T where
T: MallocSizeOf,
impl<T> MallocSizeOfExt for T where
T: MallocSizeOf,
sourcefn malloc_size_of(&self) -> usize
fn malloc_size_of(&self) -> usize
Method to launch a heapsize measurement with a fresh state. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more