pub struct ArgumentList<Head, Rest, Abi> { /* private fields */ }
Expand description
An argument list.
This type is constructed mainly at compile type via type constructions to avoid having to allocate heap memory while constructing the encoded arguments. The potentially heap allocating encoding is done right at the end where we can leverage the static environmental buffer instead of allocating heap memory.
Implementations§
Source§impl<Abi> ArgumentList<ArgumentListEnd, ArgumentListEnd, Abi>
impl<Abi> ArgumentList<ArgumentListEnd, ArgumentListEnd, Abi>
Sourcepub fn empty() -> EmptyArgumentList<Abi>
pub fn empty() -> EmptyArgumentList<Abi>
Creates a new empty argument list.
Sourcepub fn push_arg<T>(self, arg: T) -> ArgumentList<Argument<T>, Self, Abi>where
T: AbiEncodeWith<Abi>,
pub fn push_arg<T>(self, arg: T) -> ArgumentList<Argument<T>, Self, Abi>where
T: AbiEncodeWith<Abi>,
Pushes the first argument to the empty argument list.
Source§impl<Head, Rest, Abi> ArgumentList<Argument<Head>, Rest, Abi>
impl<Head, Rest, Abi> ArgumentList<Argument<Head>, Rest, Abi>
Sourcepub fn push_arg<T>(self, arg: T) -> ArgumentList<Argument<T>, Self, Abi>where
T: AbiEncodeWith<Abi>,
pub fn push_arg<T>(self, arg: T) -> ArgumentList<Argument<T>, Self, Abi>where
T: AbiEncodeWith<Abi>,
Pushes another argument to the argument list.
Trait Implementations§
Source§impl<Head: Clone, Rest: Clone, Abi: Clone> Clone for ArgumentList<Head, Rest, Abi>
impl<Head: Clone, Rest: Clone, Abi: Clone> Clone for ArgumentList<Head, Rest, Abi>
Source§fn clone(&self) -> ArgumentList<Head, Rest, Abi>
fn clone(&self) -> ArgumentList<Head, Rest, Abi>
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<Head: Default, Rest: Default, Abi: Default> Default for ArgumentList<Head, Rest, Abi>
impl<Head: Default, Rest: Default, Abi: Default> Default for ArgumentList<Head, Rest, Abi>
Source§fn default() -> ArgumentList<Head, Rest, Abi>
fn default() -> ArgumentList<Head, Rest, Abi>
Returns the “default value” for a type. Read more
Source§impl<Head, Rest> Encode for ArgumentList<Argument<Head>, Rest, Ink>where
Head: Encode,
Rest: Encode,
impl<Head, Rest> Encode for ArgumentList<Argument<Head>, Rest, Ink>where
Head: Encode,
Rest: 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<O: Output + ?Sized>(&self, output: &mut O)
fn encode_to<O: Output + ?Sized>(&self, output: &mut O)
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<Head, Rest> SolEncode<'_> for ArgumentList<Argument<Head>, Rest, Sol>where
Self: SolEncodeArgsList,
impl<Head, Rest> SolEncode<'_> for ArgumentList<Argument<Head>, Rest, Sol>where
Self: SolEncodeArgsList,
Auto Trait Implementations§
impl<Head, Rest, Abi> Freeze for ArgumentList<Head, Rest, Abi>
impl<Head, Rest, Abi> RefUnwindSafe for ArgumentList<Head, Rest, Abi>
impl<Head, Rest, Abi> Send for ArgumentList<Head, Rest, Abi>
impl<Head, Rest, Abi> Sync for ArgumentList<Head, Rest, Abi>
impl<Head, Rest, Abi> Unpin for ArgumentList<Head, Rest, Abi>
impl<Head, Rest, Abi> UnwindSafe for ArgumentList<Head, Rest, Abi>
Blanket Implementations§
§impl<T> AbiEncodeWith<Ink> for Twhere
T: Encode,
impl<T> AbiEncodeWith<Ink> for Twhere
T: Encode,
§fn encode_with(&self) -> Vec<u8> ⓘ
fn encode_with(&self) -> Vec<u8> ⓘ
Encodes the data into a new vector.
§fn encode_to_slice(&self, buffer: &mut [u8]) -> usize
fn encode_to_slice(&self, buffer: &mut [u8]) -> usize
Encodes the data into a fixed-size buffer, returning the number of bytes written.
§fn encode_to_vec(&self, buffer: &mut Vec<u8>)
fn encode_to_vec(&self, buffer: &mut Vec<u8>)
Encodes the data into a dynamically resizing vector.
§impl<T> AbiEncodeWith<Sol> for Twhere
T: for<'a> SolEncode<'a>,
impl<T> AbiEncodeWith<Sol> for Twhere
T: for<'a> SolEncode<'a>,
§fn encode_with(&self) -> Vec<u8> ⓘ
fn encode_with(&self) -> Vec<u8> ⓘ
Encodes the data into a new vector.
§fn encode_to_slice(&self, buffer: &mut [u8]) -> usize
fn encode_to_slice(&self, buffer: &mut [u8]) -> usize
Encodes the data into a fixed-size buffer, returning the number of bytes written.
§fn encode_to_vec(&self, buffer: &mut Vec<u8>)
fn encode_to_vec(&self, buffer: &mut Vec<u8>)
Encodes the data into a dynamically resizing vector.
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Defensively truncate a value and convert it into its bounded form.
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.