pub struct ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,{ /* private fields */ }
Expand description
Fixed-point decimal numbers that accept either a constant or variable number of decimals.
Unlike for ManagedDecimal
, ngative numbers are also allowed.
Implementations§
Source§impl<M, D> ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
Source§impl<M, D1> ManagedDecimalSigned<M, D1>where
M: ManagedTypeApi,
D1: Decimals,
impl<M, D1> ManagedDecimalSigned<M, D1>where
M: ManagedTypeApi,
D1: Decimals,
pub fn mul_with_precision<D2, T>( self, other: ManagedDecimalSigned<M, D2>, precision: T, ) -> ManagedDecimalSigned<M, T>
Source§impl<M, D> ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
pub fn trunc(&self) -> BigInt<M>
pub fn into_raw_units(&self) -> &BigInt<M>
pub fn from_raw_units( data: BigInt<M>, decimals: D, ) -> ManagedDecimalSigned<M, D>
pub fn scale(&self) -> usize
pub fn scaling_factor(&self) -> ManagedRef<'static, M, BigUint<M>>
pub fn rescale<T>(&self, scale_to: T) -> ManagedDecimalSigned<M, T>where
T: Decimals,
pub fn into_unsigned_or_fail(self) -> ManagedDecimal<M, D>
pub fn sign(&self) -> Sign
Source§impl<M, DECIMALS> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
pub fn const_decimals_from_raw( data: BigInt<M>, ) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Sourcepub fn into_var_decimals(self) -> ManagedDecimalSigned<M, usize>
pub fn into_var_decimals(self) -> ManagedDecimalSigned<M, usize>
Converts from constant (compile-time) number of decimals to a variable number of decimals.
Source§impl<M, D> ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
pub fn to_big_float(&self) -> BigFloat<M>
pub fn from_big_float<T>(
big_float: &BigFloat<M>,
num_decimals: T,
) -> ManagedDecimalSigned<M, T>where
T: Decimals,
Trait Implementations§
Source§impl<DECIMALS, M> Add<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Add<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
+
operator.Source§fn add(
self,
rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>,
) -> <ManagedDecimalSigned<M, usize> as Add<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
fn add( self, rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, ) -> <ManagedDecimalSigned<M, usize> as Add<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
Performs the
+
operation. Read moreSource§impl<DECIMALS, M> Add<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Add<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
+
operator.Source§fn add(
self,
rhs: ManagedDecimalSigned<M, usize>,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Add<ManagedDecimalSigned<M, usize>>>::Output
fn add( self, rhs: ManagedDecimalSigned<M, usize>, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Add<ManagedDecimalSigned<M, usize>>>::Output
Performs the
+
operation. Read moreSource§impl<M, DECIMALS> Add for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> Add for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§type Output = ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
type Output = ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
The resulting type after applying the
+
operator.Source§fn add(
self,
rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Add>::Output
fn add( self, rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Add>::Output
Performs the
+
operation. Read moreSource§impl<M> Add for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> Add for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
+
operator.Source§fn add(
self,
rhs: ManagedDecimalSigned<M, usize>,
) -> <ManagedDecimalSigned<M, usize> as Add>::Output
fn add( self, rhs: ManagedDecimalSigned<M, usize>, ) -> <ManagedDecimalSigned<M, usize> as Add>::Output
Performs the
+
operation. Read moreSource§impl<M, D1, D2> AddAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> AddAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn add_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
fn add_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
Performs the
+=
operation. Read moreSource§impl<M, D1, D2> AddAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> AddAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn add_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
fn add_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
Performs the
+=
operation. Read moreSource§impl<M, D> Clone for ManagedDecimalSigned<M, D>
impl<M, D> Clone for ManagedDecimalSigned<M, D>
Source§fn clone(&self) -> ManagedDecimalSigned<M, D>
fn clone(&self) -> ManagedDecimalSigned<M, D>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<M, D> Debug for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> Debug for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
Source§impl<M, D> Display for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> Display for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
Source§impl<DECIMALS, M> Div<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Div<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
/
operator.Source§fn div(
self,
rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>,
) -> <ManagedDecimalSigned<M, usize> as Div<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
fn div( self, rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, ) -> <ManagedDecimalSigned<M, usize> as Div<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
Performs the
/
operation. Read moreSource§impl<M, D1, D2> Div<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> Div<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§type Output = ManagedDecimalSigned<M, <D1 as Sub<D2>>::Output>
type Output = ManagedDecimalSigned<M, <D1 as Sub<D2>>::Output>
The resulting type after applying the
/
operator.Source§fn div(
self,
other: ManagedDecimalSigned<M, D2>,
) -> <ManagedDecimalSigned<M, D1> as Div<ManagedDecimalSigned<M, D2>>>::Output
fn div( self, other: ManagedDecimalSigned<M, D2>, ) -> <ManagedDecimalSigned<M, D1> as Div<ManagedDecimalSigned<M, D2>>>::Output
Performs the
/
operation. Read moreSource§impl<DECIMALS, M> Div<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Div<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
/
operator.Source§fn div(
self,
rhs: ManagedDecimalSigned<M, usize>,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Div<ManagedDecimalSigned<M, usize>>>::Output
fn div( self, rhs: ManagedDecimalSigned<M, usize>, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Div<ManagedDecimalSigned<M, usize>>>::Output
Performs the
/
operation. Read moreSource§impl<M, D> Div<usize> for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> Div<usize> for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
Source§impl<M, D1, D2> DivAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> DivAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn div_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
fn div_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
Performs the
/=
operation. Read moreSource§impl<M, D1, D2> DivAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> DivAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn div_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
fn div_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
Performs the
/=
operation. Read moreSource§impl<M, DECIMALS> From<&BigFloat<M>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> From<&BigFloat<M>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn from(value: &BigFloat<M>) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn from(value: &BigFloat<M>) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Converts to this type from the input type.
Source§impl<M, DECIMALS> From<BigFloat<M>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> From<BigFloat<M>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn from(value: BigFloat<M>) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn from(value: BigFloat<M>) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Converts to this type from the input type.
Source§impl<M, DECIMALS> From<BigInt<M>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> From<BigInt<M>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn from(value: BigInt<M>) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn from(value: BigInt<M>) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Converts to this type from the input type.
Source§impl<M, DECIMALS> From<f32> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> From<f32> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn from(x: f32) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn from(x: f32) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Converts to this type from the input type.
Source§impl<M, DECIMALS> From<f64> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> From<f64> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn from(x: f64) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn from(x: f64) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Converts to this type from the input type.
Source§impl<M, DECIMALS> From<i64> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> From<i64> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn from(value: i64) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn from(value: i64) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Converts to this type from the input type.
Source§impl<M, DECIMALS> ManagedVecItem for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> ManagedVecItem for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§const SKIPS_RESERIALIZATION: bool = false
const SKIPS_RESERIALIZATION: bool = false
If true, then the encoding of the item is identical to the payload,
and no further conversion is necessary
(the underlying buffer can be used as-is during serialization).
False for all managed types, but true for basic types (like
u32
).Source§type PAYLOAD = ManagedVecItemPayloadBuffer<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>
type PAYLOAD = ManagedVecItemPayloadBuffer<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>
Type managing the underlying binary representation in a ManagedVec..
Source§type Ref<'a> = ManagedVecRef<'a, ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>
type Ref<'a> = ManagedVecRef<'a, ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>
Reference representation of the ManagedVec item. Read more
Source§fn read_from_payload(
payload: &<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::PAYLOAD,
) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn read_from_payload( payload: &<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::PAYLOAD, ) -> ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
Parses given bytes as a an owned object.
Source§unsafe fn borrow_from_payload<'a>(
payload: &<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::PAYLOAD,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::Ref<'a>
unsafe fn borrow_from_payload<'a>( payload: &<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::PAYLOAD, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::Ref<'a>
Parses given bytes as a representation of the object, either owned, or a reference. Read more
Source§fn save_to_payload(
self,
payload: &mut <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::PAYLOAD,
)
fn save_to_payload( self, payload: &mut <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as ManagedVecItem>::PAYLOAD, )
Converts the object into bytes. Read more
fn payload_size() -> usize
Source§impl<M> ManagedVecItem for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> ManagedVecItem for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§const SKIPS_RESERIALIZATION: bool = false
const SKIPS_RESERIALIZATION: bool = false
If true, then the encoding of the item is identical to the payload,
and no further conversion is necessary
(the underlying buffer can be used as-is during serialization).
False for all managed types, but true for basic types (like
u32
).Source§type PAYLOAD = ManagedVecItemPayloadBuffer<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
type PAYLOAD = ManagedVecItemPayloadBuffer<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
Type managing the underlying binary representation in a ManagedVec..
Source§type Ref<'a> = ManagedVecRef<'a, ManagedDecimalSigned<M, usize>>
type Ref<'a> = ManagedVecRef<'a, ManagedDecimalSigned<M, usize>>
Reference representation of the ManagedVec item. Read more
Source§fn read_from_payload(
payload: &<ManagedDecimalSigned<M, usize> as ManagedVecItem>::PAYLOAD,
) -> ManagedDecimalSigned<M, usize>
fn read_from_payload( payload: &<ManagedDecimalSigned<M, usize> as ManagedVecItem>::PAYLOAD, ) -> ManagedDecimalSigned<M, usize>
Parses given bytes as a an owned object.
Source§unsafe fn borrow_from_payload<'a>(
payload: &<ManagedDecimalSigned<M, usize> as ManagedVecItem>::PAYLOAD,
) -> <ManagedDecimalSigned<M, usize> as ManagedVecItem>::Ref<'a>
unsafe fn borrow_from_payload<'a>( payload: &<ManagedDecimalSigned<M, usize> as ManagedVecItem>::PAYLOAD, ) -> <ManagedDecimalSigned<M, usize> as ManagedVecItem>::Ref<'a>
Parses given bytes as a representation of the object, either owned, or a reference. Read more
Source§fn save_to_payload(
self,
payload: &mut <ManagedDecimalSigned<M, usize> as ManagedVecItem>::PAYLOAD,
)
fn save_to_payload( self, payload: &mut <ManagedDecimalSigned<M, usize> as ManagedVecItem>::PAYLOAD, )
Converts the object into bytes. Read more
fn payload_size() -> usize
Source§impl<DECIMALS, M> Mul<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Mul<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
*
operator.Source§fn mul(
self,
rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>,
) -> <ManagedDecimalSigned<M, usize> as Mul<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
fn mul( self, rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, ) -> <ManagedDecimalSigned<M, usize> as Mul<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
Performs the
*
operation. Read moreSource§impl<M, D1, D2> Mul<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> Mul<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§type Output = ManagedDecimalSigned<M, <D1 as Add<D2>>::Output>
type Output = ManagedDecimalSigned<M, <D1 as Add<D2>>::Output>
The resulting type after applying the
*
operator.Source§fn mul(
self,
other: ManagedDecimalSigned<M, D2>,
) -> <ManagedDecimalSigned<M, D1> as Mul<ManagedDecimalSigned<M, D2>>>::Output
fn mul( self, other: ManagedDecimalSigned<M, D2>, ) -> <ManagedDecimalSigned<M, D1> as Mul<ManagedDecimalSigned<M, D2>>>::Output
Performs the
*
operation. Read moreSource§impl<DECIMALS, M> Mul<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Mul<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
*
operator.Source§fn mul(
self,
rhs: ManagedDecimalSigned<M, usize>,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Mul<ManagedDecimalSigned<M, usize>>>::Output
fn mul( self, rhs: ManagedDecimalSigned<M, usize>, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Mul<ManagedDecimalSigned<M, usize>>>::Output
Performs the
*
operation. Read moreSource§impl<M, D1, D2> MulAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> MulAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn mul_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
fn mul_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
Performs the
*=
operation. Read moreSource§impl<M, D1, D2> MulAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> MulAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn mul_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
fn mul_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
Performs the
*=
operation. Read moreSource§impl<M, DECIMALS> NestedDecode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> NestedDecode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
Version of
dep_decode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
Attempt to deserialise the value from input,
using the format of an object nested inside another structure.
In case of success returns the deserialized value and the number of bytes consumed during the operation.
Source§impl<M> NestedDecode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> NestedDecode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<ManagedDecimalSigned<M, usize>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<ManagedDecimalSigned<M, usize>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
Version of
dep_decode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
Attempt to deserialise the value from input,
using the format of an object nested inside another structure.
In case of success returns the deserialized value and the number of bytes consumed during the operation.
Source§impl<M, DECIMALS> NestedEncode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> NestedEncode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
Version of
dep_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
NestedEncode to output, using the format of an object nested inside another structure.
Does not provide compact version.
Source§impl<M> NestedEncode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> NestedEncode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
Version of
dep_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
NestedEncode to output, using the format of an object nested inside another structure.
Does not provide compact version.
Source§impl<M, D1, D2> PartialEq<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> PartialEq<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn eq(&self, other: &ManagedDecimalSigned<M, D2>) -> bool
fn eq(&self, other: &ManagedDecimalSigned<M, D2>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<M, D1, D2> PartialOrd<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> PartialOrd<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§impl<M, D> SCDisplay for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
impl<M, D> SCDisplay for ManagedDecimalSigned<M, D>where
M: ManagedTypeApi,
D: Decimals,
fn fmt<F>(&self, f: &mut F)where
F: FormatByteReceiver,
Source§impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, usize>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
-
operator.Source§fn sub(
self,
rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>,
) -> <ManagedDecimalSigned<M, usize> as Sub<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
fn sub( self, rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, ) -> <ManagedDecimalSigned<M, usize> as Sub<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>>>::Output
Performs the
-
operation. Read moreSource§impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
impl<DECIMALS, M> Sub<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
DECIMALS: Unsigned,
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
-
operator.Source§fn sub(
self,
rhs: ManagedDecimalSigned<M, usize>,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Sub<ManagedDecimalSigned<M, usize>>>::Output
fn sub( self, rhs: ManagedDecimalSigned<M, usize>, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Sub<ManagedDecimalSigned<M, usize>>>::Output
Performs the
-
operation. Read moreSource§impl<M, DECIMALS> Sub for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> Sub for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§type Output = ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
type Output = ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
The resulting type after applying the
-
operator.Source§fn sub(
self,
rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>,
) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Sub>::Output
fn sub( self, rhs: ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, ) -> <ManagedDecimalSigned<M, ConstDecimals<DECIMALS>> as Sub>::Output
Performs the
-
operation. Read moreSource§impl<M> Sub for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> Sub for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§type Output = ManagedDecimalSigned<M, usize>
type Output = ManagedDecimalSigned<M, usize>
The resulting type after applying the
-
operator.Source§fn sub(
self,
rhs: ManagedDecimalSigned<M, usize>,
) -> <ManagedDecimalSigned<M, usize> as Sub>::Output
fn sub( self, rhs: ManagedDecimalSigned<M, usize>, ) -> <ManagedDecimalSigned<M, usize> as Sub>::Output
Performs the
-
operation. Read moreSource§impl<M, D1, D2> SubAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> SubAssign<&ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn sub_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
fn sub_assign(&mut self, rhs: &ManagedDecimalSigned<M, D2>)
Performs the
-=
operation. Read moreSource§impl<M, D1, D2> SubAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
impl<M, D1, D2> SubAssign<ManagedDecimalSigned<M, D2>> for ManagedDecimalSigned<M, D1>
Source§fn sub_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
fn sub_assign(&mut self, rhs: ManagedDecimalSigned<M, D2>)
Performs the
-=
operation. Read moreSource§impl<M, DECIMALS> TopDecode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> TopDecode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn top_decode_or_handle_err<I, H>(
input: I,
h: H,
) -> Result<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
fn top_decode_or_handle_err<I, H>(
input: I,
h: H,
) -> Result<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
Version of
top_decode
that can handle errors as soon as they occur.
For instance it can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
Attempt to deserialize the value from input.
Source§impl<M> TopDecode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> TopDecode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§fn top_decode_or_handle_err<I, H>(
top_input: I,
h: H,
) -> Result<ManagedDecimalSigned<M, usize>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
fn top_decode_or_handle_err<I, H>(
top_input: I,
h: H,
) -> Result<ManagedDecimalSigned<M, usize>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
Version of
top_decode
that can handle errors as soon as they occur.
For instance it can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
Attempt to deserialize the value from input.
Source§impl<M, DECIMALS> TopEncode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> TopEncode for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
Source§fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
Version of
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
Attempt to serialize the value to output.
Source§impl<M> TopEncode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> TopEncode for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Source§fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
Version of
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
Attempt to serialize the value to output.
Source§impl<M, DECIMALS> TypeAbi for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M, DECIMALS> TypeAbi for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
type Unmanaged = ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>
fn type_name() -> String
fn type_name_rust() -> String
fn type_names() -> TypeNames
Source§fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
A type can provide more than its own name.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
Source§impl<M> TypeAbi for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
impl<M> TypeAbi for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
type Unmanaged = ManagedDecimalSigned<M, usize>
fn type_name() -> String
fn type_names() -> TypeNames
fn type_name_rust() -> String
Source§fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
A type can provide more than its own name.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
impl<M, DECIMALS> TypeAbiFrom<ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>> for ManagedDecimalSigned<M, ConstDecimals<DECIMALS>>where
M: ManagedTypeApi,
DECIMALS: Unsigned,
impl<M> TypeAbiFrom<ManagedDecimalSigned<M, usize>> for ManagedDecimalSigned<M, usize>where
M: ManagedTypeApi,
Auto Trait Implementations§
impl<M, D> Freeze for ManagedDecimalSigned<M, D>
impl<M, D> RefUnwindSafe for ManagedDecimalSigned<M, D>
impl<M, D> Send for ManagedDecimalSigned<M, D>
impl<M, D> Sync for ManagedDecimalSigned<M, D>
impl<M, D> Unpin for ManagedDecimalSigned<M, D>
impl<M, D> UnwindSafe for ManagedDecimalSigned<M, D>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MultiValueConstLength for T
impl<T> MultiValueConstLength for T
Source§const MULTI_VALUE_CONST_LEN: usize = 1usize
const MULTI_VALUE_CONST_LEN: usize = 1usize
The fixed (constant) number of single items contained a multi-value. Read more
Source§impl<T> MultiValueLength for T
impl<T> MultiValueLength for T
Source§fn multi_value_len(&self) -> usize
fn multi_value_len(&self) -> usize
The number of single items contained a multi-value.
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReconstructableFrom<&T> for Twhere
T: Clone,
impl<T> ReconstructableFrom<&T> for Twhere
T: Clone,
fn reconstruct_from(from: &T, _builder: &ReconstructorContext) -> T
Source§impl<T> ReconstructableFrom<T> for T
impl<T> ReconstructableFrom<T> for T
fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> T
Source§impl<T> SCCodec for Twhere
T: TopEncode,
impl<T> SCCodec for Twhere
T: TopEncode,
fn fmt<F>(&self, f: &mut F)where
F: FormatByteReceiver,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.
Source§impl<T> TopDecodeMulti for Twhere
T: TopDecode,
impl<T> TopDecodeMulti for Twhere
T: TopDecode,
Source§const IS_SINGLE_VALUE: bool = true
const IS_SINGLE_VALUE: bool = true
Used to optimize single value loading of endpoint arguments.
fn multi_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<T, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeMultiInput,
H: DecodeErrorHandler,
fn multi_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: TopDecodeMultiInput,
Source§impl<T> TopEncodeMulti for Twhere
T: TopEncode,
impl<T> TopEncodeMulti for Twhere
T: TopEncode,
Source§fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
Version of
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
Attempt to serialize the value to output.