Enum sp_arithmetic::ArithmeticError
source · pub enum ArithmeticError {
Underflow,
Overflow,
DivisionByZero,
}
Expand description
Arithmetic errors.
Variants
Underflow
Underflow.
Overflow
Overflow.
DivisionByZero
Division by zero.
Trait Implementations
sourceimpl Clone for ArithmeticError
impl Clone for ArithmeticError
sourcefn clone(&self) -> ArithmeticError
fn clone(&self) -> ArithmeticError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ArithmeticError
impl Debug for ArithmeticError
sourceimpl Decode for ArithmeticError
impl Decode for ArithmeticError
sourcefn 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 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
sourceimpl<'de> Deserialize<'de> for ArithmeticError
impl<'de> Deserialize<'de> for ArithmeticError
sourcefn 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
sourceimpl Encode for ArithmeticError
impl Encode for ArithmeticError
sourcefn 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
sourceimpl From<ArithmeticError> for &'static str
impl From<ArithmeticError> for &'static str
sourcefn from(e: ArithmeticError) -> &'static str
fn from(e: ArithmeticError) -> &'static str
Converts to this type from the input type.
sourceimpl MaxEncodedLen for ArithmeticError
impl MaxEncodedLen for ArithmeticError
sourcefn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
sourceimpl PartialEq<ArithmeticError> for ArithmeticError
impl PartialEq<ArithmeticError> for ArithmeticError
sourcefn eq(&self, other: &ArithmeticError) -> bool
fn eq(&self, other: &ArithmeticError) -> bool
sourceimpl Serialize for ArithmeticError
impl Serialize for ArithmeticError
sourceimpl TypeInfo for ArithmeticError
impl TypeInfo for ArithmeticError
type Identity = ArithmeticError
type Identity = ArithmeticError
The type identifying for which type info is provided. Read more
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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 moreimpl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
fn decode_all_with_depth_limit(limit: u32, input: &mut &[u8]) -> Result<T, Error>
fn decode_all_with_depth_limit(limit: u32, input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read morefn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where
I: Input,
fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where
I: Input,
Decode
Self
with the given maximum recursion depth and advance input
by the number of
bytes consumed. Read moreimpl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8, Global>
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8, Global>
Return an encoding of
Self
prepended by given slice.sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
sourcefn 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 moresourceimpl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
sourcefn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.