pub enum DepositLimit<Balance> {
Unchecked,
Balance(Balance),
}
Variants§
Unchecked
Allows bypassing all balance transfer checks.
Balance(Balance)
Specifies a maximum allowable balance for a deposit.
Trait Implementations§
source§impl<Balance: Clone> Clone for DepositLimit<Balance>
impl<Balance: Clone> Clone for DepositLimit<Balance>
source§fn clone(&self) -> DepositLimit<Balance>
fn clone(&self) -> DepositLimit<Balance>
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<Balance: Debug> Debug for DepositLimit<Balance>
impl<Balance: Debug> Debug for DepositLimit<Balance>
source§impl<Balance> Decode for DepositLimit<Balance>where
Balance: Decode,
impl<Balance> Decode for DepositLimit<Balance>where
Balance: Decode,
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, Balance> Deserialize<'de> for DepositLimit<Balance>where
Balance: Deserialize<'de>,
impl<'de, Balance> Deserialize<'de> for DepositLimit<Balance>where
Balance: Deserialize<'de>,
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<Balance> Encode for DepositLimit<Balance>where
Balance: Encode,
impl<Balance> Encode for DepositLimit<Balance>where
Balance: Encode,
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
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) -> R
fn using_encoded<R, F>(&self, f: F) -> 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<Balance> EncodeAsType for DepositLimit<Balance>where
Balance: EncodeAsType,
impl<Balance> EncodeAsType for DepositLimit<Balance>where
Balance: EncodeAsType,
source§fn encode_as_type_to<ScaleEncodeResolver: TypeResolver>(
&self,
__encode_as_type_type_id: ScaleEncodeResolver::TypeId,
__encode_as_type_types: &ScaleEncodeResolver,
__encode_as_type_out: &mut Vec<u8>,
) -> Result<(), Error>
fn encode_as_type_to<ScaleEncodeResolver: TypeResolver>( &self, __encode_as_type_type_id: ScaleEncodeResolver::TypeId, __encode_as_type_types: &ScaleEncodeResolver, __encode_as_type_out: &mut Vec<u8>, ) -> Result<(), Error>
Given some
type_id
, types
, a context
and some output target for the SCALE encoded bytes,
attempt to SCALE encode the current value into the type given by type_id
.source§impl<T> From<T> for DepositLimit<T>
impl<T> From<T> for DepositLimit<T>
source§impl<Balance: PartialEq> PartialEq for DepositLimit<Balance>
impl<Balance: PartialEq> PartialEq for DepositLimit<Balance>
source§impl<Balance> Serialize for DepositLimit<Balance>where
Balance: Serialize,
impl<Balance> Serialize for DepositLimit<Balance>where
Balance: Serialize,
source§impl<Balance> TypeInfo for DepositLimit<Balance>where
Balance: TypeInfo + 'static,
impl<Balance> TypeInfo for DepositLimit<Balance>where
Balance: TypeInfo + 'static,
impl<Balance> EncodeLike for DepositLimit<Balance>where
Balance: Encode,
impl<Balance: Eq> Eq for DepositLimit<Balance>
impl<Balance> StructuralPartialEq for DepositLimit<Balance>
Auto Trait Implementations§
impl<Balance> Freeze for DepositLimit<Balance>where
Balance: Freeze,
impl<Balance> RefUnwindSafe for DepositLimit<Balance>where
Balance: RefUnwindSafe,
impl<Balance> Send for DepositLimit<Balance>where
Balance: Send,
impl<Balance> Sync for DepositLimit<Balance>where
Balance: Sync,
impl<Balance> Unpin for DepositLimit<Balance>where
Balance: Unpin,
impl<Balance> UnwindSafe for DepositLimit<Balance>where
Balance: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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,
§fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>
Return an encoding of
Self
prepended by given slice.