#[repr(C)]pub struct CompactAltBlockInfo {
pub block_hash: [u8; 32],
pub pow_hash: [u8; 32],
pub height: usize,
pub weight: usize,
pub long_term_weight: usize,
pub cumulative_difficulty_low: u64,
pub cumulative_difficulty_high: u64,
}Expand description
Represents information on an alt-chain.
§Size & Alignment
assert_eq!(size_of::<CompactAltBlockInfo>(), 104);
assert_eq!(align_of::<CompactAltBlockInfo>(), 8);Fields§
§block_hash: [u8; 32]The block’s hash.
pow_hash: [u8; 32]The block’s proof-of-work hash.
height: usizeThe block’s height.
weight: usizeThe adjusted block size, in bytes.
long_term_weight: usizeThe long term block weight, which is the weight factored in with previous block weights.
cumulative_difficulty_low: u64The low 64 bits of the cumulative difficulty.
cumulative_difficulty_high: u64The high 64 bits of the cumulative difficulty.
Trait Implementations§
Source§impl Clone for CompactAltBlockInfo
impl Clone for CompactAltBlockInfo
Source§fn clone(&self) -> CompactAltBlockInfo
fn clone(&self) -> CompactAltBlockInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompactAltBlockInfo
Source§impl Debug for CompactAltBlockInfo
impl Debug for CompactAltBlockInfo
impl Eq for CompactAltBlockInfo
Source§impl Hash for CompactAltBlockInfo
impl Hash for CompactAltBlockInfo
Source§impl Ord for CompactAltBlockInfo
impl Ord for CompactAltBlockInfo
Source§fn cmp(&self, other: &CompactAltBlockInfo) -> Ordering
fn cmp(&self, other: &CompactAltBlockInfo) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CompactAltBlockInfo
impl PartialEq for CompactAltBlockInfo
Source§impl PartialOrd for CompactAltBlockInfo
impl PartialOrd for CompactAltBlockInfo
impl Pod for CompactAltBlockInfo
impl StructuralPartialEq for CompactAltBlockInfo
Auto Trait Implementations§
impl Freeze for CompactAltBlockInfo
impl RefUnwindSafe for CompactAltBlockInfo
impl Send for CompactAltBlockInfo
impl Sync for CompactAltBlockInfo
impl Unpin for CompactAltBlockInfo
impl UnsafeUnpin for CompactAltBlockInfo
impl UnwindSafe for CompactAltBlockInfo
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> NoUninit for Twhere
T: Pod,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes