Struct ark_scale::ArkScaleLen
source · #[repr(transparent)]pub struct ArkScaleLen<T, const L: usize>(pub T);Expand description
Arkworks type wrapped for serialization by Scale
Tuple Fields§
§0: TTrait Implementations§
source§impl<T: CanonicalDeserialize, const L: usize> ArkScaleMaxEncodedLen for ArkScaleLen<T, L>
impl<T: CanonicalDeserialize, const L: usize> ArkScaleMaxEncodedLen for ArkScaleLen<T, L>
source§fn max_encoded_len(_: Compress) -> usize
fn max_encoded_len(_: Compress) -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
source§impl<T: Clone, const L: usize> Clone for ArkScaleLen<T, L>
impl<T: Clone, const L: usize> Clone for ArkScaleLen<T, L>
source§fn clone(&self) -> ArkScaleLen<T, L>
fn clone(&self) -> ArkScaleLen<T, L>
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<T: CanonicalDeserialize, const L: usize> Decode for ArkScaleLen<T, L>
impl<T: CanonicalDeserialize, const L: usize> Decode for ArkScaleLen<T, L>
source§fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
Attempt to deserialise the value from input.
source§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
source§impl<T: CanonicalSerialize, const L: usize> Encode for ArkScaleLen<T, L>
impl<T: CanonicalSerialize, const L: usize> Encode for ArkScaleLen<T, L>
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<O: Output + ?Sized>(&self, dest: &mut O)
fn encode_to<O: Output + ?Sized>(&self, dest: &mut O)
Convert self to a slice and append it to the destination.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§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.
source§impl<T, const L: usize> From<T> for ArkScaleLen<T, L>
impl<T, const L: usize> From<T> for ArkScaleLen<T, L>
source§fn from(t: T) -> ArkScaleLen<T, L>
fn from(t: T) -> ArkScaleLen<T, L>
Converts to this type from the input type.
source§impl<T: PartialEq, const L: usize> PartialEq<ArkScaleLen<T, L>> for ArkScaleLen<T, L>
impl<T: PartialEq, const L: usize> PartialEq<ArkScaleLen<T, L>> for ArkScaleLen<T, L>
source§fn eq(&self, other: &ArkScaleLen<T, L>) -> bool
fn eq(&self, other: &ArkScaleLen<T, L>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<T: CanonicalSerialize, const L: usize> EncodeLike<ArkScaleLen<T, L>> for ArkScaleLen<T, L>
impl<T: Eq, const L: usize> Eq for ArkScaleLen<T, L>
impl<T, const L: usize> StructuralEq for ArkScaleLen<T, L>
impl<T, const L: usize> StructuralPartialEq for ArkScaleLen<T, L>
Auto Trait Implementations§
impl<T, const L: usize> RefUnwindSafe for ArkScaleLen<T, L>where T: RefUnwindSafe,
impl<T, const L: usize> Send for ArkScaleLen<T, L>where T: Send,
impl<T, const L: usize> Sync for ArkScaleLen<T, L>where T: Sync,
impl<T, const L: usize> Unpin for ArkScaleLen<T, L>where T: Unpin,
impl<T, const L: usize> UnwindSafe for ArkScaleLen<T, L>where T: 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