pub struct NonZeroBigUint<M>where
M: ManagedTypeApi,{ /* private fields */ }Expand description
A big, unsigned number that is guaranteed not to be zero.
The restriction is enforced by the constructors and the implementation of operations.
§Constructor
To build a NonZeroBigUint, the best way is via NonZeroBigUint::new(BigUint), which returns an Option:
- Some(NonZeroBigUint) if the input is non-zero, or
- None if the input is zero.
This way the user can handle the zero case as they see fit.
The quicker alternative is NonZeroBigUint::new_or_panic(BigUint), which will signal an error if the input is zero.
§Binary Operators
Naturally, some operations between two NonZeroBigUint can never yield zero, so no validation is needed after those operations.
For all others, there is an additional check at the end, which will crash execution if the invariant is violated.
Specifically, for the binary operators, we have implemented:
- NonZeroBigUint + NonZeroBigUint = guaranteed non-zero, no validation needed
- NonZeroBigUint * NonZeroBigUint = guaranteed non-zero, no validation needed
- NonZeroBigUint - NonZeroBigUint = could yield zero or negative, validation needed
- NonZeroBigUint / NonZeroBigUint = could yield zero, validation needed
- NonZeroBigUint % NonZeroBigUint = could yield zero, validation needed
§Assign Operators
For the assign operators, we have similar logic, but we’ve added a few more operations for convenience:
- BigUint
- u32
- u64
Again, no validation is needed when the operation guarantees a non-zero result:
- NonZeroBigUint += NonZeroBigUint
- NonZeroBigUint += &NonZeroBigUint
- NonZeroBigUint += BigUint
- NonZeroBigUint += u32
- NonZeroBigUint += u64
- NonZeroBigUint *= NonZeroBigUint
- NonZeroBigUint *= &NonZeroBigUint
Everything else gets a runtime check.
§Usage in Payments
Since token payments cannot be zero, NonZeroBigUint is used in the Payment object.
Getting a call value is guaranteed to yield non-zero amounts, so in that case NonZeroBigUint is getting its invariant from the VM.
Implementations§
Source§impl<M> NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> NonZeroBigUint<M>where
M: ManagedTypeApi,
Sourcepub fn new(bu: BigUint<M>) -> Option<NonZeroBigUint<M>>
pub fn new(bu: BigUint<M>) -> Option<NonZeroBigUint<M>>
Will return either Some, with a non-zero value, or None, for zero.
Sourcepub fn new_or_panic(bu: BigUint<M>) -> NonZeroBigUint<M>
pub fn new_or_panic(bu: BigUint<M>) -> NonZeroBigUint<M>
Convenience constructor, which will signal error if the input is 0.
Sourcepub fn into_big_uint(self) -> BigUint<M>
pub fn into_big_uint(self) -> BigUint<M>
Drops the non-zero restriction.
Sourcepub fn as_big_uint(&self) -> &BigUint<M>
pub fn as_big_uint(&self) -> &BigUint<M>
Drops the non-zero restriction.
Sourcepub fn as_big_int(&self) -> &BigInt<M>
pub fn as_big_int(&self) -> &BigInt<M>
Drops the non-zero and positive restriction.
Sourcepub fn into_big_int(self) -> BigInt<M>
pub fn into_big_int(self) -> BigInt<M>
Drops the non-zero and positive restriction.
Trait Implementations§
Source§impl<'a, 'b, M> Add<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Add<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§fn add(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn add(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
+ operation. Read moreSource§impl<'b, M> Add<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Add<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§fn add(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn add(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
+ operation. Read moreSource§impl<'b, M> Add<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Add<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§fn add(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn add(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
+ operation. Read moreSource§impl<'a, M> Add<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Add<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§impl<M> Add<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Add<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§impl<'a, M> Add<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Add<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§impl<M> Add<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Add<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§impl<M> Add for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Add for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
+ operator.Source§fn add(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn add(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
+ operation. Read moreSource§impl<M> AddAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> AddAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn add_assign(&mut self, other: &BigUint<M>)
fn add_assign(&mut self, other: &BigUint<M>)
+= operation. Read moreSource§impl<M> AddAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> AddAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn add_assign(&mut self, other: &NonZeroBigUint<M>)
fn add_assign(&mut self, other: &NonZeroBigUint<M>)
+= operation. Read moreSource§impl<M> AddAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> AddAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn add_assign(&mut self, other: BigUint<M>)
fn add_assign(&mut self, other: BigUint<M>)
+= operation. Read moreSource§impl<M> AddAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> AddAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn add_assign(&mut self, other: u32)
fn add_assign(&mut self, other: u32)
+= operation. Read moreSource§impl<M> AddAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> AddAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn add_assign(&mut self, other: u64)
fn add_assign(&mut self, other: u64)
+= operation. Read moreSource§impl<M> AddAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> AddAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn add_assign(&mut self, other: NonZeroBigUint<M>)
fn add_assign(&mut self, other: NonZeroBigUint<M>)
+= operation. Read moreSource§impl<M> Clone for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Clone for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn clone(&self) -> NonZeroBigUint<M>
fn clone(&self) -> NonZeroBigUint<M>
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<M> Debug for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Debug for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<'a, 'b, M> Div<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Div<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§fn div(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn div(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
/ operation. Read moreSource§impl<'b, M> Div<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Div<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§fn div(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn div(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
/ operation. Read moreSource§impl<'b, M> Div<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Div<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§fn div(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn div(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
/ operation. Read moreSource§impl<'a, M> Div<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Div<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§impl<M> Div<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Div<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§impl<'a, M> Div<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Div<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§impl<M> Div<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Div<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§impl<M> Div for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Div for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
/ operator.Source§fn div(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn div(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
/ operation. Read moreSource§impl<M> DivAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> DivAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn div_assign(&mut self, other: &BigUint<M>)
fn div_assign(&mut self, other: &BigUint<M>)
/= operation. Read moreSource§impl<M> DivAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> DivAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn div_assign(&mut self, other: &NonZeroBigUint<M>)
fn div_assign(&mut self, other: &NonZeroBigUint<M>)
/= operation. Read moreSource§impl<M> DivAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> DivAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn div_assign(&mut self, other: BigUint<M>)
fn div_assign(&mut self, other: BigUint<M>)
/= operation. Read moreSource§impl<M> DivAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> DivAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn div_assign(&mut self, other: u32)
fn div_assign(&mut self, other: u32)
/= operation. Read moreSource§impl<M> DivAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> DivAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn div_assign(&mut self, other: u64)
fn div_assign(&mut self, other: u64)
/= operation. Read moreSource§impl<M> DivAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> DivAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn div_assign(&mut self, other: NonZeroBigUint<M>)
fn div_assign(&mut self, other: NonZeroBigUint<M>)
/= operation. Read moreSource§impl<M> ManagedType<M> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> ManagedType<M> for NonZeroBigUint<M>where
M: ManagedTypeApi,
type OwnHandle = <M as HandleTypeInfo>::BigIntHandle
fn get_handle(&self) -> <M as HandleTypeInfo>::BigIntHandle
Source§unsafe fn forget_into_handle(
self,
) -> <NonZeroBigUint<M> as ManagedType<M>>::OwnHandle
unsafe fn forget_into_handle( self, ) -> <NonZeroBigUint<M> as ManagedType<M>>::OwnHandle
Source§fn transmute_from_handle_ref(
handle_ref: &<M as HandleTypeInfo>::BigIntHandle,
) -> &NonZeroBigUint<M>
fn transmute_from_handle_ref( handle_ref: &<M as HandleTypeInfo>::BigIntHandle, ) -> &NonZeroBigUint<M>
fn transmute_from_handle_ref_mut( handle_ref: &mut <M as HandleTypeInfo>::BigIntHandle, ) -> &mut NonZeroBigUint<M>
fn get_raw_handle(&self) -> i32
fn get_raw_handle_unchecked(&self) -> i32
fn as_ref(&self) -> ManagedRef<'_, M, Self>
Source§impl<M> ManagedVecItem for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> ManagedVecItem for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§const SKIPS_RESERIALIZATION: bool = false
const SKIPS_RESERIALIZATION: bool = false
u32).Source§type PAYLOAD = ManagedVecItemPayloadBuffer<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>
type PAYLOAD = ManagedVecItemPayloadBuffer<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>
Source§type Ref<'a> = ManagedRef<'a, M, NonZeroBigUint<M>>
type Ref<'a> = ManagedRef<'a, M, NonZeroBigUint<M>>
Source§fn read_from_payload(
payload: &<NonZeroBigUint<M> as ManagedVecItem>::PAYLOAD,
) -> NonZeroBigUint<M>
fn read_from_payload( payload: &<NonZeroBigUint<M> as ManagedVecItem>::PAYLOAD, ) -> NonZeroBigUint<M>
Source§unsafe fn borrow_from_payload<'a>(
payload: &<NonZeroBigUint<M> as ManagedVecItem>::PAYLOAD,
) -> <NonZeroBigUint<M> as ManagedVecItem>::Ref<'a>
unsafe fn borrow_from_payload<'a>( payload: &<NonZeroBigUint<M> as ManagedVecItem>::PAYLOAD, ) -> <NonZeroBigUint<M> as ManagedVecItem>::Ref<'a>
Source§fn save_to_payload(
self,
payload: &mut <NonZeroBigUint<M> as ManagedVecItem>::PAYLOAD,
)
fn save_to_payload( self, payload: &mut <NonZeroBigUint<M> as ManagedVecItem>::PAYLOAD, )
fn payload_size() -> usize
Source§impl<'a, 'b, M> Mul<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Mul<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§fn mul(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn mul(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
* operation. Read moreSource§impl<'b, M> Mul<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Mul<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§fn mul(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn mul(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
* operation. Read moreSource§impl<'b, M> Mul<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Mul<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§fn mul(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn mul(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
* operation. Read moreSource§impl<'a, M> Mul<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Mul<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§impl<M> Mul<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Mul<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§impl<'a, M> Mul<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Mul<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§impl<M> Mul<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Mul<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§impl<M> Mul for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Mul for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
* operator.Source§fn mul(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn mul(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
* operation. Read moreSource§impl<M> MulAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> MulAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn mul_assign(&mut self, other: &BigUint<M>)
fn mul_assign(&mut self, other: &BigUint<M>)
*= operation. Read moreSource§impl<M> MulAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> MulAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn mul_assign(&mut self, other: &NonZeroBigUint<M>)
fn mul_assign(&mut self, other: &NonZeroBigUint<M>)
*= operation. Read moreSource§impl<M> MulAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> MulAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn mul_assign(&mut self, other: BigUint<M>)
fn mul_assign(&mut self, other: BigUint<M>)
*= operation. Read moreSource§impl<M> MulAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> MulAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn mul_assign(&mut self, other: u32)
fn mul_assign(&mut self, other: u32)
*= operation. Read moreSource§impl<M> MulAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> MulAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
*= operation. Read moreSource§impl<M> MulAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> MulAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn mul_assign(&mut self, other: NonZeroBigUint<M>)
fn mul_assign(&mut self, other: NonZeroBigUint<M>)
*= operation. Read moreSource§impl<M> NestedDecode for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> NestedDecode for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<NonZeroBigUint<M>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<NonZeroBigUint<M>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
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,
Source§impl<M> NestedEncode for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> NestedEncode for NonZeroBigUint<M>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,
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,
Source§impl<M> Ord for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Ord for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialEq<i32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialEq<i32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialEq<i64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialEq<i64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialEq<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialEq<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialEq<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialEq<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialEq for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialEq for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialOrd<i32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialOrd<i32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialOrd<i64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialOrd<i64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialOrd<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialOrd<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialOrd<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialOrd<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<M> PartialOrd for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> PartialOrd for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§impl<'a, 'b, M> Rem<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Rem<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§fn rem(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn rem(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
% operation. Read moreSource§impl<'b, M> Rem<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Rem<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§fn rem(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn rem(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
% operation. Read moreSource§impl<'b, M> Rem<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Rem<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§fn rem(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn rem(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
% operation. Read moreSource§impl<'a, M> Rem<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Rem<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§impl<M> Rem<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Rem<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§impl<'a, M> Rem<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Rem<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§impl<M> Rem<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Rem<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§impl<M> Rem for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Rem for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
% operator.Source§fn rem(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn rem(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
% operation. Read moreSource§impl<M> RemAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> RemAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn rem_assign(&mut self, other: &BigUint<M>)
fn rem_assign(&mut self, other: &BigUint<M>)
%= operation. Read moreSource§impl<M> RemAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> RemAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn rem_assign(&mut self, other: &NonZeroBigUint<M>)
fn rem_assign(&mut self, other: &NonZeroBigUint<M>)
%= operation. Read moreSource§impl<M> RemAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> RemAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn rem_assign(&mut self, other: BigUint<M>)
fn rem_assign(&mut self, other: BigUint<M>)
%= operation. Read moreSource§impl<M> RemAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> RemAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn rem_assign(&mut self, other: u32)
fn rem_assign(&mut self, other: u32)
%= operation. Read moreSource§impl<M> RemAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> RemAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn rem_assign(&mut self, other: u64)
fn rem_assign(&mut self, other: u64)
%= operation. Read moreSource§impl<M> RemAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> RemAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn rem_assign(&mut self, other: NonZeroBigUint<M>)
fn rem_assign(&mut self, other: NonZeroBigUint<M>)
%= operation. Read moreSource§impl<M> SCDisplay for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SCDisplay for NonZeroBigUint<M>where
M: ManagedTypeApi,
fn fmt<F>(&self, f: &mut F)where
F: FormatByteReceiver,
Source§impl<'a, 'b, M> Sub<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, 'b, M> Sub<&'b NonZeroBigUint<M>> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§fn sub(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn sub(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
- operation. Read moreSource§impl<'b, M> Sub<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Sub<&'b NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§fn sub(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn sub(self, other: &NonZeroBigUint<M>) -> NonZeroBigUint<M>
- operation. Read moreSource§impl<'b, M> Sub<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'b, M> Sub<NonZeroBigUint<M>> for &'b NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§fn sub(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn sub(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
- operation. Read moreSource§impl<'a, M> Sub<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Sub<u32> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§impl<M> Sub<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Sub<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§impl<'a, M> Sub<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<'a, M> Sub<u64> for &'a NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§impl<M> Sub<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Sub<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§impl<M> Sub for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> Sub for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Output = NonZeroBigUint<M>
type Output = NonZeroBigUint<M>
- operator.Source§fn sub(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
fn sub(self, other: NonZeroBigUint<M>) -> NonZeroBigUint<M>
- operation. Read moreSource§impl<M> SubAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SubAssign<&BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn sub_assign(&mut self, other: &BigUint<M>)
fn sub_assign(&mut self, other: &BigUint<M>)
-= operation. Read moreSource§impl<M> SubAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SubAssign<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn sub_assign(&mut self, other: &NonZeroBigUint<M>)
fn sub_assign(&mut self, other: &NonZeroBigUint<M>)
-= operation. Read moreSource§impl<M> SubAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SubAssign<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn sub_assign(&mut self, other: BigUint<M>)
fn sub_assign(&mut self, other: BigUint<M>)
-= operation. Read moreSource§impl<M> SubAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SubAssign<u32> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn sub_assign(&mut self, other: u32)
fn sub_assign(&mut self, other: u32)
-= operation. Read moreSource§impl<M> SubAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SubAssign<u64> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn sub_assign(&mut self, other: u64)
fn sub_assign(&mut self, other: u64)
-= operation. Read moreSource§impl<M> SubAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> SubAssign for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn sub_assign(&mut self, other: NonZeroBigUint<M>)
fn sub_assign(&mut self, other: NonZeroBigUint<M>)
-= operation. Read moreSource§impl<M> TopDecode for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TopDecode for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§fn top_decode_or_handle_err<I, H>(
input: I,
h: H,
) -> Result<NonZeroBigUint<M>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
fn top_decode_or_handle_err<I, H>(
input: I,
h: H,
) -> Result<NonZeroBigUint<M>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
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,
Source§impl<M> TopEncode for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TopEncode for NonZeroBigUint<M>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,
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,
Source§impl<M> TryFrom<&ManagedBuffer<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TryFrom<&ManagedBuffer<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Error = NonZeroError
type Error = NonZeroError
Source§fn try_from(
item: &ManagedBuffer<M>,
) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<&ManagedBuffer<M>>>::Error>
fn try_from( item: &ManagedBuffer<M>, ) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<&ManagedBuffer<M>>>::Error>
Source§impl<M> TryFrom<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TryFrom<BigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Error = NonZeroError
type Error = NonZeroError
Source§fn try_from(
bu: BigUint<M>,
) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<BigUint<M>>>::Error>
fn try_from( bu: BigUint<M>, ) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<BigUint<M>>>::Error>
Source§impl<M> TryFrom<ManagedBuffer<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TryFrom<ManagedBuffer<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Error = NonZeroError
type Error = NonZeroError
Source§fn try_from(
item: ManagedBuffer<M>,
) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<ManagedBuffer<M>>>::Error>
fn try_from( item: ManagedBuffer<M>, ) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<ManagedBuffer<M>>>::Error>
Source§impl<M> TryFrom<u128> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TryFrom<u128> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Source§type Error = NonZeroError
type Error = NonZeroError
Source§fn try_from(
value: u128,
) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<u128>>::Error>
fn try_from( value: u128, ) -> Result<NonZeroBigUint<M>, <NonZeroBigUint<M> as TryFrom<u128>>::Error>
Source§impl<M> TypeAbi for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TypeAbi for NonZeroBigUint<M>where
M: ManagedTypeApi,
type Unmanaged = NonZeroBigUint<M>
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,
impl<M> Eq for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TypeAbiFrom<&NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
impl<M> TypeAbiFrom<NonZeroBigUint<M>> for NonZeroBigUint<M>where
M: ManagedTypeApi,
Auto Trait Implementations§
impl<M> Freeze for NonZeroBigUint<M>
impl<M> RefUnwindSafe for NonZeroBigUint<M>
impl<M> Send for NonZeroBigUint<M>
impl<M> Sync for NonZeroBigUint<M>
impl<M> Unpin for NonZeroBigUint<M>
impl<M> UnwindSafe for NonZeroBigUint<M>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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
Source§impl<T> MultiValueLength for T
impl<T> MultiValueLength for T
Source§fn multi_value_len(&self) -> usize
fn multi_value_len(&self) -> usize
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> 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
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,
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.