pub enum ParamValue {
Null,
Int(i64),
Float(f64),
Bool(bool),
Str(String),
}Expand description
A bound value supplied for a $N placeholder in
crate::parser::parse_with_params.
Unlike Literal, this carries a Null variant so a parameter can
bind PowQL null (substituted as Token::Null, not a string). Values
are turned into literal tokens before parsing, so an injection-shaped
string is inert data — it can never change the query’s shape.
Variants§
Trait Implementations§
Source§impl Clone for ParamValue
impl Clone for ParamValue
Source§fn clone(&self) -> ParamValue
fn clone(&self) -> ParamValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParamValue
impl Debug for ParamValue
Source§impl PartialEq for ParamValue
impl PartialEq for ParamValue
Source§fn eq(&self, other: &ParamValue) -> bool
fn eq(&self, other: &ParamValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParamValue
Auto Trait Implementations§
impl Freeze for ParamValue
impl RefUnwindSafe for ParamValue
impl Send for ParamValue
impl Sync for ParamValue
impl Unpin for ParamValue
impl UnsafeUnpin for ParamValue
impl UnwindSafe for ParamValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more