Struct Tuple

Source
pub struct Tuple(/* private fields */);
Expand description

A tuple of values.

Implementations§

Source§

impl Tuple

Source

pub fn new(item_count: usize) -> Self

Creates a new tuple.

Source

pub fn new_from_data_type(data_type: DataType) -> Tuple

Creates a new tuple from an existing data type.

Source

pub fn data_type(&mut self) -> ConstDataType<'_>

Gets the data type of a tuple.

Source

pub fn set_null(&mut self, index: usize) -> Result<&mut Self>

Sets an null in a tuple at the specified index.

Source

pub fn set_int8(&mut self, index: usize, value: i8) -> Result<&mut Self>

Sets a “tinyint” in a tuple at the specified index.

Source

pub fn set_int16(&mut self, index: usize, value: i16) -> Result<&mut Self>

Sets an “smallint” in a tuple at the specified index.

Source

pub fn set_int32(&mut self, index: usize, value: i32) -> Result<&mut Self>

Sets an “int” in a tuple at the specified index.

Source

pub fn set_uint32(&mut self, index: usize, value: u32) -> Result<&mut Self>

Sets a “date” in a tuple at the specified index.

Source

pub fn set_int64(&mut self, index: usize, value: i64) -> Result<&mut Self>

Sets a “bigint”, “counter”, “timestamp” or “time” in a tuple at the specified index.

Source

pub fn set_float(&mut self, index: usize, value: f32) -> Result<&mut Self>

Sets a “float” in a tuple at the specified index.

Source

pub fn set_double(&mut self, index: usize, value: f64) -> Result<&mut Self>

Sets a “double” in a tuple at the specified index.

Source

pub fn set_bool(&mut self, index: usize, value: bool) -> Result<&mut Self>

Sets a “boolean” in a tuple at the specified index.

Source

pub fn set_string<S>(&mut self, index: usize, value: S) -> Result<&mut Self>
where S: Into<String>,

Sets an “ascii”, “text” or “varchar” in a tuple at the specified index.

Source

pub fn set_bytes(&mut self, index: usize, value: Vec<u8>) -> Result<&mut Self>

Sets a “blob”, “varint” or “custom” in a tuple at the specified index.

Source

pub fn set_uuid<S>(&mut self, index: usize, value: S) -> Result<&mut Self>
where S: Into<Uuid>,

Sets a “uuid” or “timeuuid” in a tuple at the specified index.

Source

pub fn set_inet(&mut self, index: usize, value: IpAddr) -> Result<&mut Self>

Sets an “inet” in a tuple at the specified index.

Source

pub fn set_list<S>(&mut self, index: usize, value: S) -> Result<&mut Self>
where S: Into<List>,

Sets a list in a tuple at the specified index.

Source

pub fn set_map<S>(&mut self, index: usize, value: S) -> Result<&mut Self>
where S: Into<Map>,

Sets a map in a tuple at the specified index.

Source

pub fn set_set<S>(&mut self, index: usize, value: S) -> Result<&mut Self>
where S: Into<Set>,

Sets a set“ in a tuple at the specified index.

Source

pub fn set_tuple(&mut self, index: usize, value: Tuple) -> Result<&mut Self>

Sets a “tuple” in a tuple at the specified index.

Source

pub fn set_user_type( &mut self, index: usize, value: &UserType, ) -> Result<&mut Self>

Sets a “udt” in a tuple at the specified index.

Trait Implementations§

Source§

impl BindRustType<Tuple> for Statement

Source§

fn bind(&mut self, index: usize, value: Tuple) -> Result<&mut Self>

binds a rust type to C* by index
Source§

fn bind_by_name(&mut self, col: &str, value: Tuple) -> Result<&mut Self>

binds a rust type to C* by name
Source§

impl Debug for Tuple

Source§

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

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

impl Drop for Tuple

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for Tuple

Source§

impl Sync for Tuple

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,