Skip to main content

Bound

Enum Bound 

Source
pub enum Bound {
Show 25 variants Null, Bool(bool), I16(i16), I32(i32), I64(i64), F32(f32), F64(f64), Text(String), Uuid(Uuid), Timestamptz(DateTime<Utc>), Timestamp(NaiveDateTime), Date(NaiveDate), Time(NaiveTime), Json(Value), Numeric(PgNumeric), Bytes(Vec<u8>), TextArray(Vec<Option<String>>), UuidArray(Vec<Option<Uuid>>), I16Array(Vec<Option<i16>>), I32Array(Vec<Option<i32>>), I64Array(Vec<Option<i64>>), BoolArray(Vec<Option<bool>>), F64Array(Vec<Option<f64>>), NumericArray(Vec<Option<PgNumeric>>), JsonArray(Vec<Option<Value>>),
}

Variants§

§

Null

§

Bool(bool)

§

I16(i16)

§

I32(i32)

§

I64(i64)

§

F32(f32)

§

F64(f64)

§

Text(String)

Sent as its text bytes: text-like types, enum labels, unknown.

§

Uuid(Uuid)

§

Timestamptz(DateTime<Utc>)

§

Timestamp(NaiveDateTime)

§

Date(NaiveDate)

§

Time(NaiveTime)

§

Json(Value)

§

Numeric(PgNumeric)

§

Bytes(Vec<u8>)

§

TextArray(Vec<Option<String>>)

§

UuidArray(Vec<Option<Uuid>>)

§

I16Array(Vec<Option<i16>>)

§

I32Array(Vec<Option<i32>>)

§

I64Array(Vec<Option<i64>>)

§

BoolArray(Vec<Option<bool>>)

§

F64Array(Vec<Option<f64>>)

§

NumericArray(Vec<Option<PgNumeric>>)

§

JsonArray(Vec<Option<Value>>)

Trait Implementations§

Source§

impl Clone for Bound

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Bound

Source§

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

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

impl PartialEq for Bound

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Bound

Source§

impl ToSql for Bound

Every value is encoded as its type’s base: a domain is received by its base type’s input function, and an array of domains carries the domain in its header but base-encoded elements.

Source§

fn to_sql( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more
Source§

fn accepts(_: &Type) -> bool

Determines if a value of this type can be converted to the specified Postgres Type.
Source§

fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

An adaptor method used internally by Rust-Postgres. Read more
Source§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format

Auto Trait Implementations§

§

impl Freeze for Bound

§

impl RefUnwindSafe for Bound

§

impl Send for Bound

§

impl Sync for Bound

§

impl Unpin for Bound

§

impl UnsafeUnpin for Bound

§

impl UnwindSafe for Bound

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> BorrowToSql for T
where T: ToSql,

Source§

fn borrow_to_sql(&self) -> &dyn ToSql

Returns a reference to self as a ToSql trait object.
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.