Skip to main content

IntoParams

Trait IntoParams 

Source
pub trait IntoParams: Sealed {
    // Required method
    fn into_params(self) -> Vec<Value>;
}
Expand description

Types that can be passed as SQL statement parameters to Database::execute / Database::query / Transaction::execute / Transaction::query.

Sealed (see the private sealed::Sealed supertrait): only this crate’s own conversions — () (no parameters), and an array or slice of anything Into<Value> (including Value itself, via its reflexive Into) — implement it. Positional only, matching this crate’s v1 scope (module doc).

Required Methods§

Source

fn into_params(self) -> Vec<Value>

Convert into this crate’s positional parameter list.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl IntoParams for ()

Source§

impl<T: Into<Value> + Clone> IntoParams for &[T]

Source§

impl<T: Into<Value>, const N: usize> IntoParams for [T; N]

Implementors§