Struct linera_base::data_types::RoundNumber
source · pub struct RoundNumber(pub u64);Expand description
A number to identify successive attempts to decide a value in a consensus protocol.
Tuple Fields§
§0: u64Implementations§
source§impl RoundNumber
impl RoundNumber
pub fn zero() -> Self
pub fn max() -> Self
pub fn try_add(self, other: Self) -> Result<Self, ArithmeticError>
pub fn try_add_one(self) -> Result<Self, ArithmeticError>
pub fn saturating_add(self, other: Self) -> Self
pub fn try_sub(self, other: Self) -> Result<Self, ArithmeticError>
pub fn try_sub_one(self) -> Result<Self, ArithmeticError>
pub fn saturating_sub(self, other: Self) -> Self
pub fn try_add_assign(&mut self, other: Self) -> Result<(), ArithmeticError>
pub fn try_add_assign_one(&mut self) -> Result<(), ArithmeticError>
pub fn saturating_add_assign(&mut self, other: Self)
pub fn try_sub_assign(&mut self, other: Self) -> Result<(), ArithmeticError>
pub fn saturating_mul(&self, other: u64) -> Self
pub fn try_mul(self, other: u64) -> Result<Self, ArithmeticError>
pub fn try_mul_assign(&mut self, other: u64) -> Result<(), ArithmeticError>
Trait Implementations§
source§impl Clone for RoundNumber
impl Clone for RoundNumber
source§fn clone(&self) -> RoundNumber
fn clone(&self) -> RoundNumber
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RoundNumber
impl Debug for RoundNumber
source§impl Default for RoundNumber
impl Default for RoundNumber
source§fn default() -> RoundNumber
fn default() -> RoundNumber
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RoundNumber
impl<'de> Deserialize<'de> for RoundNumber
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 RoundNumber
impl Display for RoundNumber
source§impl From<RoundNumber> for u64
impl From<RoundNumber> for u64
source§fn from(value: RoundNumber) -> Self
fn from(value: RoundNumber) -> Self
Converts to this type from the input type.
source§impl FromStr for RoundNumber
impl FromStr for RoundNumber
source§impl Hash for RoundNumber
impl Hash for RoundNumber
source§impl InputType for RoundNumber
impl InputType for RoundNumber
§type RawValueType = RoundNumber
type RawValueType = RoundNumber
The raw type used for validator. Read more
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value. None represents undefined.source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl Ord for RoundNumber
impl Ord for RoundNumber
source§fn cmp(&self, other: &RoundNumber) -> Ordering
fn cmp(&self, other: &RoundNumber) -> Ordering
1.21.0 · 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 OutputType for RoundNumber
impl OutputType for RoundNumber
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _: &'life1 ContextSelectionSet<'life2>, _field: &'life3 Positioned<Field> ) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Resolve an output value to
async_graphql::Value.source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl PartialEq<RoundNumber> for RoundNumber
impl PartialEq<RoundNumber> for RoundNumber
source§fn eq(&self, other: &RoundNumber) -> bool
fn eq(&self, other: &RoundNumber) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<RoundNumber> for RoundNumber
impl PartialOrd<RoundNumber> for RoundNumber
source§fn partial_cmp(&self, other: &RoundNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &RoundNumber) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl ScalarType for RoundNumber
impl ScalarType for RoundNumber
source§impl Serialize for RoundNumber
impl Serialize for RoundNumber
impl Copy for RoundNumber
impl Eq for RoundNumber
impl StructuralEq for RoundNumber
impl StructuralPartialEq for RoundNumber
Auto Trait Implementations§
impl RefUnwindSafe for RoundNumber
impl Send for RoundNumber
impl Sync for RoundNumber
impl Unpin for RoundNumber
impl UnwindSafe for RoundNumber
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.