[−][src]Struct hycon_rust::common::meta::Meta
Fields
height: u32header: HeaderTypet_ema: f64p_ema: f64next_difficulty: f64total_work: f64file_number: Option<u32>offset: Option<u64>length: Option<u32>status: BlockStatusMethods
impl<HeaderType> Meta<HeaderType> where
HeaderType: BlockHeader + Clone + Encode + Proto, [src]
HeaderType: BlockHeader + Clone + Encode + Proto,
pub fn new(
height: u32,
header: HeaderType,
t_ema: f64,
p_ema: f64,
next_difficulty: f64,
total_work: f64,
file_number: Option<u32>,
offset: Option<u64>,
length: Option<u32>,
status: BlockStatus
) -> Self[src]
height: u32,
header: HeaderType,
t_ema: f64,
p_ema: f64,
next_difficulty: f64,
total_work: f64,
file_number: Option<u32>,
offset: Option<u64>,
length: Option<u32>,
status: BlockStatus
) -> Self
Trait Implementations
impl<HeaderType> ForkChoice<Meta<HeaderType>> for Consensus where
HeaderType: BlockHeader + Proto + Encode + Clone, [src]
HeaderType: BlockHeader + Proto + Encode + Clone,
fn fork_choice(tip: &Meta<HeaderType>, new_block: &Meta<HeaderType>) -> bool[src]
impl<HeaderType> BlockForkChoice for Meta<HeaderType> where
HeaderType: BlockHeader + Clone + Proto + Encode, [src]
HeaderType: BlockHeader + Clone + Proto + Encode,
fn fork_choice(&self, other: &Meta<HeaderType>) -> Ordering[src]
impl<HeaderType> Encode for Meta<HeaderType> where
HeaderType: BlockHeader + Clone + Proto + Encode, [src]
HeaderType: BlockHeader + Clone + Proto + Encode,
impl<HeaderType> Decode for Meta<HeaderType> where
HeaderType: Proto<ProtoType = BlockHeader> + BlockHeader + Clone + Encode, [src]
HeaderType: Proto<ProtoType = BlockHeader> + BlockHeader + Clone + Encode,
impl<HeaderType> Proto for Meta<HeaderType> where
HeaderType: BlockHeader + Clone + Proto + Encode, [src]
HeaderType: BlockHeader + Clone + Proto + Encode,
type ProtoType = ProtoBlockDB
fn to_proto(&self) -> Result<Self::ProtoType, Box<dyn Error>>[src]
fn from_proto(_prototype: &Self::ProtoType) -> Result<Self, Box<dyn Error>>[src]
impl<HeaderType: Clone> Clone for Meta<HeaderType> where
HeaderType: BlockHeader + Clone + Encode + Proto, [src]
HeaderType: BlockHeader + Clone + Encode + Proto,
fn clone(&self) -> Meta<HeaderType>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<HeaderType: Debug> Debug for Meta<HeaderType> where
HeaderType: BlockHeader + Clone + Encode + Proto, [src]
HeaderType: BlockHeader + Clone + Encode + Proto,
Auto Trait Implementations
impl<HeaderType> Send for Meta<HeaderType> where
HeaderType: Send,
HeaderType: Send,
impl<HeaderType> Sync for Meta<HeaderType> where
HeaderType: Sync,
HeaderType: Sync,
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self