pub struct ArgumentList<Head, Rest> { /* 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 ArgumentList<ArgumentListEnd, ArgumentListEnd>

source

pub fn empty() -> EmptyArgumentList

Creates a new empty argument list.

source

pub fn push_arg<T>(self, arg: T) -> ArgumentList<Argument<T>, Self>where T: Encode,

Pushes the first argument to the empty argument list.

source§

impl<Head, Rest> ArgumentList<Argument<Head>, Rest>

source

pub fn push_arg<T>(self, arg: T) -> ArgumentList<Argument<T>, Self>where T: Encode,

Pushes another argument to the argument list.

Trait Implementations§

source§

impl<Head: Clone, Rest: Clone> Clone for ArgumentList<Head, Rest>

source§

fn clone(&self) -> ArgumentList<Head, Rest>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Head: Debug, Rest: Debug> Debug for ArgumentList<Head, Rest>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Head: Default, Rest: Default> Default for ArgumentList<Head, Rest>

source§

fn default() -> ArgumentList<Head, Rest>

Returns the “default value” for a type. Read more
source§

impl<Head, Rest> Encode for ArgumentList<Argument<Head>, Rest>where Head: Encode, Rest: Encode,

source§

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)

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

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.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more

Auto Trait Implementations§

§

impl<Head, Rest> RefUnwindSafe for ArgumentList<Head, Rest>where Head: RefUnwindSafe, Rest: RefUnwindSafe,

§

impl<Head, Rest> Send for ArgumentList<Head, Rest>where Head: Send, Rest: Send,

§

impl<Head, Rest> Sync for ArgumentList<Head, Rest>where Head: Sync, Rest: Sync,

§

impl<Head, Rest> Unpin for ArgumentList<Head, Rest>where Head: Unpin, Rest: Unpin,

§

impl<Head, Rest> UnwindSafe for ArgumentList<Head, Rest>where Head: UnwindSafe, Rest: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> EncodeLike<&&T> for Twhere T: Encode,

§

impl<T> EncodeLike<&T> for Twhere T: Encode,

§

impl<T> EncodeLike<&mut T> for Twhere T: Encode,

§

impl<T> EncodeLike<Arc<T>> for Twhere T: Encode,

§

impl<T> EncodeLike<Box<T>> for Twhere T: Encode,

§

impl<'a, T> EncodeLike<Cow<'a, T>> for Twhere T: ToOwned + Encode,

§

impl<T> EncodeLike<Rc<T>> for Twhere T: Encode,

§

impl<T> TypeId for Twhere T: Debug + Default,