[−][src]Struct core_cbc_casper::ValidatorNameBlockData
This block data structure contains the name of the validator that created that block. This is used by the tests in order to have a simple data structure.
Implements BlockData
.
Example
use core_cbc_casper::blockchain::BlockData; use core_cbc_casper::ValidatorNameBlockData; use core_cbc_casper::validator::ValidatorName; // Using u32 as the ValidatorName, which is implemented in `core_cbc_casper::validator`. let data = ValidatorNameBlockData::<u32>::new(13); assert_eq!( *data.validator_name(), 13 );
Methods
impl<V: ValidatorName + Default> ValidatorNameBlockData<V>
[src]
Trait Implementations
impl<V: ValidatorName + Default> BlockData for ValidatorNameBlockData<V>
[src]
type ValidatorName = V
The type of validators that can produce data of this type.
fn validator_name(&self) -> &Self::ValidatorName
[src]
impl<V: Clone + ValidatorName + Default> Clone for ValidatorNameBlockData<V>
[src]
fn clone(&self) -> ValidatorNameBlockData<V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V: Default + ValidatorName> Default for ValidatorNameBlockData<V>
[src]
fn default() -> ValidatorNameBlockData<V>
[src]
impl<V: Eq + ValidatorName + Default> Eq for ValidatorNameBlockData<V>
[src]
impl<V: Hash + ValidatorName + Default> Hash for ValidatorNameBlockData<V>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<V: PartialEq + ValidatorName + Default> PartialEq<ValidatorNameBlockData<V>> for ValidatorNameBlockData<V>
[src]
fn eq(&self, other: &ValidatorNameBlockData<V>) -> bool
[src]
fn ne(&self, other: &ValidatorNameBlockData<V>) -> bool
[src]
impl<V: ValidatorName + Default> Serialize for ValidatorNameBlockData<V>
[src]
impl<V: ValidatorName + Default> StructuralEq for ValidatorNameBlockData<V>
[src]
impl<V: ValidatorName + Default> StructuralPartialEq for ValidatorNameBlockData<V>
[src]
Auto Trait Implementations
impl<V> RefUnwindSafe for ValidatorNameBlockData<V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<V> Send for ValidatorNameBlockData<V>
impl<V> Sync for ValidatorNameBlockData<V>
impl<V> Unpin for ValidatorNameBlockData<V> where
V: Unpin,
V: Unpin,
impl<V> UnwindSafe for ValidatorNameBlockData<V> where
V: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,