Enum Params

Source
pub enum Params {
    Empty,
    Named(HashMap<Vec<u8>, Value>),
    Positional(Vec<Value>),
}
Expand description

Representations of parameters of a prepared statement.

Variants§

§

Empty

§

Named(HashMap<Vec<u8>, Value>)

§

Positional(Vec<Value>)

Implementations§

Source§

impl Params

Source

pub fn into_positional( self, named_params: &[Vec<u8>], ) -> Result<Params, MissingNamedParameterError>

Will convert named parameters into positional assuming order passed in named_params attribute.

Trait Implementations§

Source§

impl Clone for Params

Source§

fn clone(&self) -> Params

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 Debug for Params

Source§

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

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

impl<'a> From<&'a [&'a dyn ToValue]> for Params

Source§

fn from(x: &'a [&'a dyn ToValue]) -> Params

Converts to this type from the input type.
Source§

impl<'a, T> From<&'a T> for Params
where T: Into<Params> + Clone,

Source§

fn from(x: &'a T) -> Params

Converts to this type from the input type.
Source§

impl From<()> for Params

Source§

fn from(_: ()) -> Params

Converts to this type from the input type.
Source§

impl<A> From<(A,)> for Params
where A: Into<Value>,

Source§

fn from(x: (A,)) -> Params

Converts to this type from the input type.
Source§

impl<A, B> From<(A, B)> for Params
where A: Into<Value>, B: Into<Value>,

Source§

fn from(x: (A, B)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C> From<(A, B, C)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>,

Source§

fn from(x: (A, B, C)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D> From<(A, B, C, D)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>,

Source§

fn from(x: (A, B, C, D)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E> From<(A, B, C, D, E)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>,

Source§

fn from(x: (A, B, C, D, E)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F> From<(A, B, C, D, E, F)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F, G> From<(A, B, C, D, E, F, G)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F, G)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F, G, H> From<(A, B, C, D, E, F, G, H)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F, G, H)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F, G, H, I> From<(A, B, C, D, E, F, G, H, I)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F, G, H, I)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F, G, H, I, J> From<(A, B, C, D, E, F, G, H, I, J)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F, G, H, I, J)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F, G, H, I, J, K> From<(A, B, C, D, E, F, G, H, I, J, K)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F, G, H, I, J, K)) -> Params

Converts to this type from the input type.
Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> From<(A, B, C, D, E, F, G, H, I, J, K, L)> for Params
where A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>, L: Into<Value>,

Source§

fn from(x: (A, B, C, D, E, F, G, H, I, J, K, L)) -> Params

Converts to this type from the input type.
Source§

impl<N, V> From<Vec<(N, V)>> for Params
where Vec<u8>: From<N>, Value: From<V>,

Source§

fn from(x: Vec<(N, V)>) -> Params

Converts to this type from the input type.
Source§

impl<T> From<Vec<T>> for Params
where Value: From<T>,

Source§

fn from(x: Vec<T>) -> Params

Converts to this type from the input type.
Source§

impl PartialEq for Params

Source§

fn eq(&self, other: &Params) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Params

Auto Trait Implementations§

§

impl Freeze for Params

§

impl RefUnwindSafe for Params

§

impl Send for Params

§

impl Sync for Params

§

impl Unpin for Params

§

impl UnwindSafe for Params

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T