#[repr(transparent)]pub struct ArkScale<T, const U: Usage = WIRE>(pub T);
Expand description
Arkworks type wrapped for serialization by Scale
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T: CanonicalDeserialize, const U: Usage> Decode for ArkScale<T, U>
impl<T: CanonicalDeserialize, const U: Usage> Decode for ArkScale<T, U>
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 U: Usage> Encode for ArkScale<T, U>
impl<T: CanonicalSerialize, const U: Usage> Encode for ArkScale<T, U>
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) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§impl<T, const U: Usage> MaxEncodedLen for ArkScale<T, U>where
T: CanonicalSerialize + ArkScaleMaxEncodedLen,
impl<T, const U: Usage> MaxEncodedLen for ArkScale<T, U>where
T: CanonicalSerialize + ArkScaleMaxEncodedLen,
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
impl<T: CanonicalSerialize, const U: Usage> EncodeLike for ArkScale<T, U>
impl<T: Eq, const U: Usage> Eq for ArkScale<T, U>
impl<T, const U: Usage> StructuralPartialEq for ArkScale<T, U>
Auto Trait Implementations§
impl<T, const U: u8> Freeze for ArkScale<T, U>where
T: Freeze,
impl<T, const U: u8> RefUnwindSafe for ArkScale<T, U>where
T: RefUnwindSafe,
impl<T, const U: u8> Send for ArkScale<T, U>where
T: Send,
impl<T, const U: u8> Sync for ArkScale<T, U>where
T: Sync,
impl<T, const U: u8> Unpin for ArkScale<T, U>where
T: Unpin,
impl<T, const U: u8> UnwindSafe for ArkScale<T, U>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