[][src]Trait sqlx_core::arguments::Arguments

pub trait Arguments: Send + Sized + Default + 'static {
    type Database: Database + ?Sized;
    fn len(&self) -> usize;
fn size(&self) -> usize;
fn reserve(&mut self, len: usize, size: usize);
fn add<T>(&mut self, value: T)
    where
        Self::Database: HasSqlType<T>,
        T: Encode<Self::Database>
; fn is_empty(&self) -> bool { ... } }

A tuple of arguments to be sent to the database.

Associated Types

Loading content...

Required methods

fn len(&self) -> usize

Returns the number of values.

fn size(&self) -> usize

Returns the size of the arguments, in bytes.

fn reserve(&mut self, len: usize, size: usize)

Reserves the capacity for at least len more values (of size bytes) to be added to the arguments without a reallocation.

fn add<T>(&mut self, value: T) where
    Self::Database: HasSqlType<T>,
    T: Encode<Self::Database>, 

Add the value to the end of the arguments.

Loading content...

Provided methods

fn is_empty(&self) -> bool

Returns true if there are no values.

Loading content...

Implementors

Loading content...