Struct pgrx::datum::numeric::Numeric

source ·
pub struct Numeric<const P: u32, const S: u32>(/* private fields */);
Expand description

A wrapper around the Postgres SQL NUMERIC(P, S) type. Its Precision and Scale values are known at compile-time to assist with scale conversions and general type safety.

PostgreSQL permits the scale in a numeric type declaration to be any value in the range -1000 to 1000. However, the SQL standard requires the scale to be in the range 0 to precision. Using scales outside that range may not be portable to other database systems.

pgrx, by using a u32 for the scale, restricts it to be in line with the SQL standard. While it is possible to specify value larger than 1000, ultimately Postgres will reject such values.

All the various Rust arithmetic traits are implemented for AnyNumeric, but using them, even if the (P, S) is the same on both sides of the operator converts the result to an AnyNumeric. It is AnyNumeric that also supports the various “Assign” (ie, AddAssign) traits.

Numeric is well-suited for a #[pg_extern] return type, more so than a function argument. Use AnyNumeric for those.

Implementations§

source§

impl<const P: u32, const S: u32> Numeric<P, S>

source

pub fn as_anynumeric(&self) -> &AnyNumeric

Borrow this AnyNumeric as the more generic AnyNumeric

source

pub fn rescale<const NEW_P: u32, const NEW_S: u32>( self, ) -> Result<Numeric<NEW_P, NEW_S>, Error>

Consume this AnyNumeric and a new Precision and Scale.

Returns an Error if this AnyNumeric doesn’t fit within the new constraints.

§Examples
use pgrx::{AnyNumeric, Numeric};
use pgrx_pg_sys::float4;
let start = AnyNumeric::try_from(42.42).unwrap();
let rescaled:float4 = start.rescale::<3, 1>().unwrap().try_into().unwrap();
assert_eq!(rescaled, 42.4);

Methods from Deref<Target = AnyNumeric>§

source

pub fn sign(&self) -> Sign

Returns the sign of this AnyNumeric

source

pub fn is_nan(&self) -> bool

Is this AnyNumeric not-a-number?

source

pub fn abs(&self) -> Self

The absolute value of this AnyNumeric

source

pub fn log(&self, base: AnyNumeric) -> Self

Compute the logarithm of this AnyNumeric in the given base

source

pub fn sqrt(&self) -> Self

Compute the square root of this AnyNumeric

source

pub fn ceil(&self) -> Self

Return the smallest integer greater than or equal to this AnyNumeric

source

pub fn floor(&self) -> Self

Return the largest integer equal to or less than this AnyNumeric

source

pub fn gcd(&self, n: &AnyNumeric) -> AnyNumeric

Calculate the greatest common divisor of this an another AnyNumeric

source

pub fn normalize(&self) -> &str

Output function for numeric data type, suppressing insignificant trailing zeroes and then any trailing decimal point. The intent of this is to produce strings that are equal if and only if the input numeric values compare equal.

Trait Implementations§

source§

impl<const P: u32, const S: u32> Add<AnyNumeric> for Numeric<P, S>

AnyNumeric on the left, Numeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: AnyNumeric) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for f32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for f64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for isize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<Numeric<P, S>> for usize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<P, S>) -> Self::Output

Performs the + operation. Read more
source§

impl<const Q: u32, const T: u32> Add<Numeric<Q, T>> for AnyNumeric

Numeric on the left, AnyNumeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32, const Q: u32, const T: u32> Add<Numeric<Q, T>> for Numeric<P, S>

Doing this operation on two Numeric instances results in a new AnyNumeric.

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<f32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: f32) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<f64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: f64) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<i128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: i128) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<i16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: i16) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<i32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: i32) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<i64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: i64) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<i8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: i8) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<isize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: isize) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<u128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: u128) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<u16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: u16) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<u32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<u64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: u64) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<u8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: u8) -> Self::Output

Performs the + operation. Read more
source§

impl<const P: u32, const S: u32> Add<usize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the + operator.
source§

fn add(self, rhs: usize) -> Self::Output

Performs the + operation. Read more
source§

impl<'fcx, const P: u32, const S: u32> ArgAbi<'fcx> for Numeric<P, S>

source§

unsafe fn unbox_arg_unchecked(arg: Arg<'_, 'fcx>) -> Self

Unbox an argument with a matching type. Read more
source§

unsafe fn unbox_nullable_arg(arg: Arg<'_, 'fcx>) -> Nullable<Self>

Unbox a nullable arg Read more
source§

fn is_virtual_arg() -> bool

“Is this a virtual arg?”
source§

impl<const P: u32, const S: u32> BoxRet for Numeric<P, S>

source§

unsafe fn box_into<'fcx>(self, fcinfo: &mut FcInfo<'fcx>) -> Datum<'fcx>

Safety Read more
source§

impl<const P: u32, const S: u32> Clone for Numeric<P, S>

source§

fn clone(&self) -> Numeric<P, S>

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<const P: u32, const S: u32> Debug for Numeric<P, S>

source§

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

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

impl<const P: u32, const S: u32> Deref for Numeric<P, S>

source§

type Target = AnyNumeric

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<const P: u32, const S: u32> Display for Numeric<P, S>

source§

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

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

impl<const P: u32, const S: u32> Div<AnyNumeric> for Numeric<P, S>

AnyNumeric on the left, Numeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: AnyNumeric) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for f32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for f64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for isize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<Numeric<P, S>> for usize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<P, S>) -> Self::Output

Performs the / operation. Read more
source§

impl<const Q: u32, const T: u32> Div<Numeric<Q, T>> for AnyNumeric

Numeric on the left, AnyNumeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32, const Q: u32, const T: u32> Div<Numeric<Q, T>> for Numeric<P, S>

Doing this operation on two Numeric instances results in a new AnyNumeric.

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<f32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: f32) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<f64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: f64) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<i128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: i128) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<i16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: i16) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<i32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: i32) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<i64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: i64) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<i8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: i8) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<isize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: isize) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<u128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: u128) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<u16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: u16) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<u32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<u64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: u64) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<u8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: u8) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> Div<usize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the / operator.
source§

fn div(self, rhs: usize) -> Self::Output

Performs the / operation. Read more
source§

impl<const P: u32, const S: u32> From<Numeric<P, S>> for AnyNumeric

source§

fn from(n: Numeric<P, S>) -> Self

Converts to this type from the input type.
source§

impl<const P: u32, const S: u32> FromDatum for Numeric<P, S>

source§

unsafe fn from_polymorphic_datum( datum: Datum, is_null: bool, typoid: Oid, ) -> Option<Self>
where Self: Sized,

Like from_datum for instantiating polymorphic types which require preserving the dynamic type metadata. Read more
source§

const GET_TYPOID: bool = false

Should a type OID be fetched when calling from_datum?
source§

unsafe fn from_datum(datum: Datum, is_null: bool) -> Option<Self>

Safety Read more
source§

unsafe fn from_datum_in_memory_context( memory_context: PgMemoryContexts, datum: Datum, is_null: bool, typoid: Oid, ) -> Option<Self>

Default implementation switched to the specified memory context and then simply calls FromDatum::from_datum(...) from within that context. Read more
source§

unsafe fn try_from_datum( datum: Datum, is_null: bool, type_oid: Oid, ) -> Result<Option<Self>, TryFromDatumError>
where Self: IntoDatum,

try_from_datum is a convenience wrapper around FromDatum::from_datum that returns a a Result around an Option, as a Datum can be null. It’s intended to be used in situations where the caller needs to know whether the type conversion succeeded or failed. Read more
source§

unsafe fn try_from_datum_in_memory_context( memory_context: PgMemoryContexts, datum: Datum, is_null: bool, type_oid: Oid, ) -> Result<Option<Self>, TryFromDatumError>
where Self: IntoDatum,

A version of try_from_datum that switches to the given context to convert from Datum
source§

impl<const P: u32, const S: u32> FromStr for Numeric<P, S>

source§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl<const P: u32, const S: u32> Hash for Numeric<P, S>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<const P: u32, const S: u32> IntoDatum for Numeric<P, S>

source§

fn into_datum(self) -> Option<Datum>

source§

fn type_oid() -> Oid

source§

fn composite_type_oid(&self) -> Option<Oid>

source§

fn is_compatible_with(other: Oid) -> bool

Is a Datum of this type compatible with another Postgres type? Read more
source§

impl<const P: u32, const S: u32> Mul<AnyNumeric> for Numeric<P, S>

AnyNumeric on the left, Numeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: AnyNumeric) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for f32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for f64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for isize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for usize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<P, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<const Q: u32, const T: u32> Mul<Numeric<Q, T>> for AnyNumeric

Numeric on the left, AnyNumeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32, const Q: u32, const T: u32> Mul<Numeric<Q, T>> for Numeric<P, S>

Doing this operation on two Numeric instances results in a new AnyNumeric.

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<f32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f32) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<f64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f64) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<i128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i128) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<i16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i16) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<i32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i32) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<i64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i64) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<i8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i8) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<isize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: isize) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<u128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u128) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<u16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<u32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<u64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<u8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Mul<usize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self::Output

Performs the * operation. Read more
source§

impl<const P: u32, const S: u32> Neg for Numeric<P, S>

source§

type Output = Numeric<P, S>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<const P: u32, const S: u32> Ord for Numeric<P, S>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<const P: u32, const S: u32> PartialEq for Numeric<P, S>

source§

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

Postgres implementation detail: Unlike in Rust, Postgres considers NaN as equal

source§

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

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

impl<const P: u32, const S: u32> PartialOrd for Numeric<P, S>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

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

Tests less than (for self and other) and is used by the < operator. Read more
source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const P: u32, const S: u32> RangeSubType for Numeric<P, S>

for numeric/numrange

source§

impl<const P: u32, const S: u32> Rem<AnyNumeric> for Numeric<P, S>

AnyNumeric on the left, Numeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: AnyNumeric) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for f32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for f64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for isize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for usize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<P, S>) -> Self::Output

Performs the % operation. Read more
source§

impl<const Q: u32, const T: u32> Rem<Numeric<Q, T>> for AnyNumeric

Numeric on the left, AnyNumeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32, const Q: u32, const T: u32> Rem<Numeric<Q, T>> for Numeric<P, S>

Doing this operation on two Numeric instances results in a new AnyNumeric.

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<f32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: f32) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<f64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: f64) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<i128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i128) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<i16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i16) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<i32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i32) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<i64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i64) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<i8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i8) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<isize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: isize) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<u128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u128) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<u16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u16) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<u32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u32) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<u64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u64) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<u8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u8) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> Rem<usize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the % operator.
source§

fn rem(self, rhs: usize) -> Self::Output

Performs the % operation. Read more
source§

impl<const P: u32, const S: u32> SqlTranslatable for Numeric<P, S>

source§

impl<const P: u32, const S: u32> Sub<AnyNumeric> for Numeric<P, S>

AnyNumeric on the left, Numeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: AnyNumeric) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for f32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for f64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for isize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u128

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u16

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u32

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u64

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u8

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for usize

Rust primitive on the left, Numeric on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<P, S>) -> Self::Output

Performs the - operation. Read more
source§

impl<const Q: u32, const T: u32> Sub<Numeric<Q, T>> for AnyNumeric

Numeric on the left, AnyNumeric on the right. Results in a new AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32, const Q: u32, const T: u32> Sub<Numeric<Q, T>> for Numeric<P, S>

Doing this operation on two Numeric instances results in a new AnyNumeric.

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Numeric<Q, T>) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<f32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: f32) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<f64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: f64) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<i128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i128) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<i16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i16) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<i32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i32) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<i64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i64) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<i8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i8) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<isize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: isize) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<u128> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u128) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<u16> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u16) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<u32> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u32) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<u64> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u64) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<u8> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u8) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> Sub<usize> for Numeric<P, S>

Numeric on the left, rust primitive on the right. Results in an AnyNumeric

source§

type Output = AnyNumeric

The resulting type after applying the - operator.
source§

fn sub(self, rhs: usize) -> Self::Output

Performs the - operation. Read more
source§

impl<const P: u32, const S: u32> TryFrom<&CStr> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: &CStr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<&str> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<AnyNumeric> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: AnyNumeric) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for f32

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for f64

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for i128

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for i16

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for i32

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for i64

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for i8

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for isize

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u128

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u16

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u32

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u64

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u8

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for usize

Try to convert using the signed equivalent. If that fails, then try using slower String conversion

source§

type Error = Error

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

fn try_from(value: Numeric<P, S>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<f32> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: f32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<f64> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: f64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<i128> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<i16> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<i32> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<i64> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<i8> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<isize> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<u128> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<u16> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<u32> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<u64> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<u8> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> TryFrom<usize> for Numeric<P, S>

source§

type Error = Error

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

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const P: u32, const S: u32> UnboxDatum for Numeric<P, S>

source§

type As<'src> = Numeric<P, S>

Self with the lifetime 'src Read more
source§

unsafe fn unbox<'src>(d: Datum<'src>) -> Self::As<'src>
where Self: 'src,

Convert from Datum<'src> to T::As<'src> Read more
source§

impl<const P: u32, const S: u32> Eq for Numeric<P, S>

Postgres implementation detail: Unlike in Rust, Postgres considers NaN as equal

Auto Trait Implementations§

§

impl<const P: u32, const S: u32> Freeze for Numeric<P, S>

§

impl<const P: u32, const S: u32> RefUnwindSafe for Numeric<P, S>

§

impl<const P: u32, const S: u32> Send for Numeric<P, S>

§

impl<const P: u32, const S: u32> Sync for Numeric<P, S>

§

impl<const P: u32, const S: u32> Unpin for Numeric<P, S>

§

impl<const P: u32, const S: u32> UnwindSafe for Numeric<P, S>

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<T> Conv for T

source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> FmtForward for T

source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. 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> Pipe for T
where T: ?Sized,

source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Tap for T

source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T> TryConv for T

source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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<T> WithTypeIds for T
where T: ?Sized,

source§

const ITEM_ID: Lazy<TypeId> = const ITEM_ID: Lazy<TypeId> = Lazy::new(|| nonstatic_typeid::<T>());

source§

const OPTION_ID: Lazy<Option<TypeId>> = const OPTION_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const VEC_ID: Lazy<Option<TypeId>> = const VEC_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const VEC_OPTION_ID: Lazy<Option<TypeId>> = const VEC_OPTION_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const OPTION_VEC_ID: Lazy<Option<TypeId>> = const OPTION_VEC_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const OPTION_VEC_OPTION_ID: Lazy<Option<TypeId>> = const OPTION_VEC_OPTION_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const ARRAY_ID: Lazy<Option<TypeId>> = const ARRAY_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const OPTION_ARRAY_ID: Lazy<Option<TypeId>> = const OPTION_ARRAY_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const VARIADICARRAY_ID: Lazy<Option<TypeId>> = const VARIADICARRAY_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const OPTION_VARIADICARRAY_ID: Lazy<Option<TypeId>> = const OPTION_VARIADICARRAY_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const VARLENA_ID: Lazy<Option<TypeId>> = const VARLENA_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

const OPTION_VARLENA_ID: Lazy<Option<TypeId>> = const OPTION_VARLENA_ID: Lazy<Option<TypeId>> = Lazy::new(|| None);

source§

fn register_with_refs(map: &mut HashSet<RustSqlMapping>, single_sql: String)

source§

fn register_sized_with_refs( _map: &mut HashSet<RustSqlMapping>, _single_sql: String, )

source§

fn register_sized(_map: &mut HashSet<RustSqlMapping>, _single_sql: String)

source§

fn register_varlena_with_refs( _map: &mut HashSet<RustSqlMapping>, _single_sql: String, )

source§

fn register_varlena(_map: &mut HashSet<RustSqlMapping>, _single_sql: String)

source§

fn register_array_with_refs( _map: &mut HashSet<RustSqlMapping>, _single_sql: String, )

source§

fn register_array(_map: &mut HashSet<RustSqlMapping>, _single_sql: String)

source§

fn register(set: &mut HashSet<RustSqlMapping>, single_sql: String)