Struct jormungandr::blockcfg::Value
source · pub struct Value(pub u64);
Expand description
Unspent transaction value.
Tuple Fields§
§0: u64
Implementations§
source§impl Value
impl Value
pub fn zero() -> Value
pub fn sum<I>(values: I) -> Result<Value, ValueError>where I: Iterator<Item = Value>,
pub fn saturating_add(self, other: Value) -> Value
pub fn checked_add(self, other: Value) -> Result<Value, ValueError>
pub fn checked_sub(self, other: Value) -> Result<Value, ValueError>
pub fn scale(self, n: u32) -> Result<Value, ValueError>
sourcepub fn split_in(self, n: u32) -> SplitValueIn
pub fn split_in(self, n: u32) -> SplitValueIn
Divide a value by n equals parts, with a potential remainder
pub fn bytes(self) -> [u8; 8]
Trait Implementations§
source§impl Arbitrary for Value
impl Arbitrary for Value
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§fn arbitrary_with(
args: <Value as Arbitrary>::Parameters
) -> <Value as Arbitrary>::Strategy
fn arbitrary_with( args: <Value as Arbitrary>::Parameters ) -> <Value as Arbitrary>::Strategy
source§impl Deserialize for Value
impl Deserialize for Value
source§impl From<AverageValue> for Value
impl From<AverageValue> for Value
source§fn from(value: AverageValue) -> Value
fn from(value: AverageValue) -> Value
Converts to this type from the input type.
source§impl From<NonZeroValue> for Value
impl From<NonZeroValue> for Value
source§fn from(value: NonZeroValue) -> Value
fn from(value: NonZeroValue) -> Value
Converts to this type from the input type.
source§impl Ord for Value
impl Ord for Value
source§impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
source§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
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 Serialize for Value
impl Serialize for Value
source§fn serialized_size(&self) -> usize
fn serialized_size(&self) -> usize
Default implementation, not efficient, not recommended to use it
fn serialize<W>(&self, codec: &mut Codec<W>) -> Result<(), WriteError>where W: Write,
source§fn serialize_as_vec(&self) -> Result<Vec<u8, Global>, WriteError>
fn serialize_as_vec(&self) -> Result<Vec<u8, Global>, WriteError>
Convenience method to serialize into a byte vector.
source§impl TryFrom<&[u8]> for Value
impl TryFrom<&[u8]> for Value
§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
impl Copy for Value
impl Eq for Value
impl StructuralEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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<T> DeserializeFromSlice for Twhere
T: Deserialize,
impl<T> DeserializeFromSlice for Twhere T: Deserialize,
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.§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request