pub struct RandomnessRound(/* private fields */);Expand description
Round number of generated randomness.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
randomness-round = u64Implementations§
Source§impl RandomnessRound
impl RandomnessRound
pub fn new(round: u64) -> Self
pub fn value(&self) -> u64
pub fn checked_add(self, rhs: u64) -> Option<Self>
pub fn checked_sub(self, rhs: u64) -> Option<Self>
Sourcepub fn signature_message(&self) -> Vec<u8> ⓘ
Available on crate feature serde only.
pub fn signature_message(&self) -> Vec<u8> ⓘ
serde only.Returns the message to be signed for a randomness round.
Trait Implementations§
Source§impl Add for RandomnessRound
impl Add for RandomnessRound
Source§impl Add<u64> for RandomnessRound
impl Add<u64> for RandomnessRound
Source§impl AddAssign for RandomnessRound
impl AddAssign for RandomnessRound
Source§fn add_assign(&mut self, __rhs: Self)
fn add_assign(&mut self, __rhs: Self)
Performs the
+= operation. Read moreSource§impl AddAssign<u64> for RandomnessRound
impl AddAssign<u64> for RandomnessRound
Source§fn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
Performs the
+= operation. Read moreSource§impl Arbitrary for RandomnessRound
Available on crate feature proptest only.
impl Arbitrary for RandomnessRound
Available on crate feature
proptest only.Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<RandomnessRound>
type Strategy = BoxedStrategy<RandomnessRound>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl Clone for RandomnessRound
impl Clone for RandomnessRound
Source§fn clone(&self) -> RandomnessRound
fn clone(&self) -> RandomnessRound
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 RandomnessRound
Source§impl Debug for RandomnessRound
impl Debug for RandomnessRound
Source§impl<'de> Deserialize<'de> for RandomnessRound
Available on crate feature serde only.
impl<'de> Deserialize<'de> for RandomnessRound
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RandomnessRound
impl Display for RandomnessRound
impl Eq for RandomnessRound
Source§impl From<u64> for RandomnessRound
impl From<u64> for RandomnessRound
Source§impl Hash for RandomnessRound
impl Hash for RandomnessRound
Source§impl Ord for RandomnessRound
impl Ord for RandomnessRound
Source§fn cmp(&self, other: &RandomnessRound) -> Ordering
fn cmp(&self, other: &RandomnessRound) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RandomnessRound
impl PartialEq for RandomnessRound
Source§impl PartialOrd for RandomnessRound
impl PartialOrd for RandomnessRound
Source§impl Serialize for RandomnessRound
Available on crate feature serde only.
impl Serialize for RandomnessRound
Available on crate feature
serde only.impl StructuralPartialEq for RandomnessRound
Source§impl Sub for RandomnessRound
impl Sub for RandomnessRound
Source§impl Sub<u64> for RandomnessRound
impl Sub<u64> for RandomnessRound
Source§impl SubAssign for RandomnessRound
impl SubAssign for RandomnessRound
Source§fn sub_assign(&mut self, __rhs: Self)
fn sub_assign(&mut self, __rhs: Self)
Performs the
-= operation. Read moreSource§impl SubAssign<u64> for RandomnessRound
impl SubAssign<u64> for RandomnessRound
Source§fn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
Performs the
-= operation. Read moreAuto Trait Implementations§
impl Freeze for RandomnessRound
impl RefUnwindSafe for RandomnessRound
impl Send for RandomnessRound
impl Sync for RandomnessRound
impl Unpin for RandomnessRound
impl UnsafeUnpin for RandomnessRound
impl UnwindSafe for RandomnessRound
Blanket Implementations§
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