Skip to main content

Bind

Trait Bind 

Source
pub trait Bind {
    // Required method
    fn to_value(self) -> Value;
}
Expand description

What Query::bind accepts.

Implemented for the owned and borrowed spellings of each Value, and for Option<T> of every one of them, since a nullable column is bound from an Option at most call sites.

Required Methods§

Source

fn to_value(self) -> Value

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Bind for &String

Source§

impl Bind for &Uuid

Source§

impl Bind for &Vec<u8>

Source§

impl Bind for &[u8]

Source§

impl Bind for &str

Source§

impl Bind for Option<&String>

Source§

impl Bind for Option<&Uuid>

Source§

impl Bind for Option<&Vec<u8>>

Source§

impl Bind for Option<&[u8]>

Source§

impl Bind for Option<&str>

Source§

impl Bind for Option<String>

Source§

impl Bind for Option<Uuid>

Source§

impl Bind for Option<Vec<u8>>

Source§

impl Bind for Option<bool>

Source§

impl Bind for Option<i32>

Source§

impl Bind for Option<i64>

Source§

impl Bind for Option<u32>

Source§

impl Bind for String

Source§

impl Bind for Uuid

Source§

impl Bind for Vec<u8>

Source§

impl Bind for bool

Source§

impl Bind for i32

Source§

impl Bind for i64

Source§

impl Bind for u32

Source§

impl<T: Clone> Bind for &Option<T>
where Option<T>: Bind,

A nullable column bound from a reference to the Option that holds it.

Most call sites write .bind(&row.field) rather than cloning first, so this is the shape half the binds in the crate take.

Implementors§

Source§

impl Bind for Value

A value that has already been through this enum once.

What crate::transfer binds: it reads a column at the type its manifest declares, carries it as a Value, and writes it back without ever naming a Rust type again. The identity impl is what lets the copy stay one loop over 140 columns instead of a match per column.