Enum ethcore::engines::block_reward::RewardKind
source · [−]pub enum RewardKind {
Author,
EmptyStep,
External,
Uncle(u8),
}
Expand description
The kind of block reward. Depending on the consensus engine the allocated block reward might have different semantics which could lead e.g. to different reward values.
Variants
Author
Reward attributed to the block author.
EmptyStep
Reward attributed to the author(s) of empty step(s) included in the block (AuthorityRound engine).
External
Reward attributed by an external protocol (e.g. block reward contract).
Uncle(u8)
Reward attributed to the block uncle(s) with given difference.
Implementations
sourceimpl RewardKind
impl RewardKind
sourcepub fn uncle(number: BlockNumber, uncle: BlockNumber) -> Self
pub fn uncle(number: BlockNumber, uncle: BlockNumber) -> Self
Create RewardKind::Uncle
from given current block number and uncle block number.
Trait Implementations
sourceimpl Clone for RewardKind
impl Clone for RewardKind
sourcefn clone(&self) -> RewardKind
fn clone(&self) -> RewardKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RewardKind
impl Debug for RewardKind
sourceimpl From<RewardKind> for u16
impl From<RewardKind> for u16
sourcefn from(reward_kind: RewardKind) -> Self
fn from(reward_kind: RewardKind) -> Self
Performs the conversion.
sourceimpl Into<RewardType> for RewardKind
impl Into<RewardType> for RewardKind
sourcefn into(self) -> RewardType
fn into(self) -> RewardType
Performs the conversion.
sourceimpl PartialEq<RewardKind> for RewardKind
impl PartialEq<RewardKind> for RewardKind
sourcefn eq(&self, other: &RewardKind) -> bool
fn eq(&self, other: &RewardKind) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RewardKind) -> bool
fn ne(&self, other: &RewardKind) -> bool
This method tests for !=
.
impl Copy for RewardKind
impl Eq for RewardKind
impl StructuralEq for RewardKind
impl StructuralPartialEq for RewardKind
Auto Trait Implementations
impl RefUnwindSafe for RewardKind
impl Send for RewardKind
impl Sync for RewardKind
impl Unpin for RewardKind
impl UnwindSafe for RewardKind
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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