Enum sp_arithmetic::ArithmeticError
source · pub enum ArithmeticError {
Underflow,
Overflow,
DivisionByZero,
}
Expand description
Arithmetic errors.
Variants§
Trait Implementations§
source§impl Clone for ArithmeticError
impl Clone for ArithmeticError
source§fn clone(&self) -> ArithmeticError
fn clone(&self) -> ArithmeticError
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 ArithmeticError
impl Debug for ArithmeticError
source§impl Decode for ArithmeticError
impl Decode for ArithmeticError
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl<'de> Deserialize<'de> for ArithmeticError
impl<'de> Deserialize<'de> for ArithmeticError
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 Encode for ArithmeticError
impl Encode for ArithmeticError
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<ArithmeticError> for &'static str
impl From<ArithmeticError> for &'static str
source§fn from(e: ArithmeticError) -> &'static str
fn from(e: ArithmeticError) -> &'static str
Converts to this type from the input type.
source§impl MaxEncodedLen for ArithmeticError
impl MaxEncodedLen for ArithmeticError
source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
source§impl PartialEq<ArithmeticError> for ArithmeticError
impl PartialEq<ArithmeticError> for ArithmeticError
source§fn eq(&self, other: &ArithmeticError) -> bool
fn eq(&self, other: &ArithmeticError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ArithmeticError
impl Serialize for ArithmeticError
source§impl TypeInfo for ArithmeticError
impl TypeInfo for ArithmeticError
impl Copy for ArithmeticError
impl EncodeLike<ArithmeticError> for ArithmeticError
impl Eq for ArithmeticError
impl StructuralEq for ArithmeticError
impl StructuralPartialEq for ArithmeticError
Auto Trait Implementations§
impl RefUnwindSafe for ArithmeticError
impl Send for ArithmeticError
impl Sync for ArithmeticError
impl Unpin for ArithmeticError
impl UnwindSafe for ArithmeticError
Blanket Implementations§
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere T: Decode,
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere T: Codec,
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moresource§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.