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>
impl<const P: u32, const S: u32> Numeric<P, S>
sourcepub fn as_anynumeric(&self) -> &AnyNumeric
pub fn as_anynumeric(&self) -> &AnyNumeric
Borrow this AnyNumeric as the more generic AnyNumeric
sourcepub fn rescale<const NEW_P: u32, const NEW_S: u32>(
self,
) -> Result<Numeric<NEW_P, NEW_S>, Error>
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>§
sourcepub fn sign(&self) -> Sign
pub fn sign(&self) -> Sign
Returns the sign of this AnyNumeric
sourcepub fn is_nan(&self) -> bool
pub fn is_nan(&self) -> bool
Is this AnyNumeric not-a-number?
sourcepub fn abs(&self) -> Self
pub fn abs(&self) -> Self
The absolute value of this AnyNumeric
sourcepub fn log(&self, base: AnyNumeric) -> Self
pub fn log(&self, base: AnyNumeric) -> Self
Compute the logarithm of this AnyNumeric in the given base
sourcepub fn sqrt(&self) -> Self
pub fn sqrt(&self) -> Self
Compute the square root of this AnyNumeric
sourcepub fn ceil(&self) -> Self
pub fn ceil(&self) -> Self
Return the smallest integer greater than or equal to this AnyNumeric
sourcepub fn floor(&self) -> Self
pub fn floor(&self) -> Self
Return the largest integer equal to or less than this AnyNumeric
sourcepub fn gcd(&self, n: &AnyNumeric) -> AnyNumeric
pub fn gcd(&self, n: &AnyNumeric) -> AnyNumeric
Calculate the greatest common divisor of this an another AnyNumeric
Trait Implementations§
source§impl<const P: u32, const S: u32> Add<AnyNumeric> for Numeric<P, S>
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
type Output = AnyNumeric
+ operator.source§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for f32
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for f64
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i128
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i16
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i32
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i64
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for i8
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for isize
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u128
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u16
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u32
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u64
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for u8
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§impl<const P: u32, const S: u32> Add<Numeric<P, S>> for usize
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§impl<const Q: u32, const T: u32> Add<Numeric<Q, T>> for AnyNumeric
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§impl<const P: u32, const S: u32, const Q: u32, const T: u32> Add<Numeric<Q, T>> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<f32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<f64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<i128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<i16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<i32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<i64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<i8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<isize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<u128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<u16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<u32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<u64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<u8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Add<usize> for Numeric<P, S>
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§impl<'fcx, const P: u32, const S: u32> ArgAbi<'fcx> for Numeric<P, S>
impl<'fcx, const P: u32, const S: u32> ArgAbi<'fcx> for Numeric<P, S>
source§unsafe fn unbox_arg_unchecked(arg: Arg<'_, 'fcx>) -> Self
unsafe fn unbox_arg_unchecked(arg: Arg<'_, 'fcx>) -> Self
source§unsafe fn unbox_nullable_arg(arg: Arg<'_, 'fcx>) -> Nullable<Self>
unsafe fn unbox_nullable_arg(arg: Arg<'_, 'fcx>) -> Nullable<Self>
source§fn is_virtual_arg() -> bool
fn is_virtual_arg() -> bool
source§impl<const P: u32, const S: u32> Div<AnyNumeric> for Numeric<P, S>
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
type Output = AnyNumeric
/ operator.source§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for f32
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for f64
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i128
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i16
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i32
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i64
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for i8
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for isize
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u128
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u16
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u32
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u64
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for u8
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§impl<const P: u32, const S: u32> Div<Numeric<P, S>> for usize
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§impl<const Q: u32, const T: u32> Div<Numeric<Q, T>> for AnyNumeric
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§impl<const P: u32, const S: u32, const Q: u32, const T: u32> Div<Numeric<Q, T>> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<f32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<f64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<i128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<i16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<i32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<i64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<i8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<isize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<u128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<u16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<u32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<u64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<u8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Div<usize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> FromDatum for Numeric<P, S>
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,
unsafe fn from_polymorphic_datum(
datum: Datum,
is_null: bool,
typoid: Oid,
) -> Option<Self>where
Self: Sized,
from_datum for instantiating polymorphic types
which require preserving the dynamic type metadata. Read moresource§const GET_TYPOID: bool = false
const GET_TYPOID: bool = false
from_datum?source§unsafe fn from_datum_in_memory_context(
memory_context: PgMemoryContexts,
datum: Datum,
is_null: bool,
typoid: Oid,
) -> Option<Self>
unsafe fn from_datum_in_memory_context( memory_context: PgMemoryContexts, datum: Datum, is_null: bool, typoid: Oid, ) -> Option<Self>
FromDatum::from_datum(...) from within that context. Read moresource§unsafe fn try_from_datum(
datum: Datum,
is_null: bool,
type_oid: Oid,
) -> Result<Option<Self>, TryFromDatumError>where
Self: IntoDatum,
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 moresource§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,
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,
try_from_datum that switches to the given context to convert from Datumsource§impl<const P: u32, const S: u32> Mul<AnyNumeric> for Numeric<P, S>
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
type Output = AnyNumeric
* operator.source§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for f32
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for f64
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i128
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i16
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i32
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i64
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for i8
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for isize
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u128
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u16
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u32
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u64
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for u8
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§impl<const P: u32, const S: u32> Mul<Numeric<P, S>> for usize
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§impl<const Q: u32, const T: u32> Mul<Numeric<Q, T>> for AnyNumeric
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§impl<const P: u32, const S: u32, const Q: u32, const T: u32> Mul<Numeric<Q, T>> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<f32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<f64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<i128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<i16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<i32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<i64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<i8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<isize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<u128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<u16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<u32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<u64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<u8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Mul<usize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Ord for Numeric<P, S>
impl<const P: u32, const S: u32> Ord for Numeric<P, S>
source§impl<const P: u32, const S: u32> PartialOrd for Numeric<P, S>
impl<const P: u32, const S: u32> PartialOrd for Numeric<P, S>
source§impl<const P: u32, const S: u32> RangeSubType for Numeric<P, S>
impl<const P: u32, const S: u32> RangeSubType for Numeric<P, S>
for numeric/numrange
fn range_type_oid() -> Oid
source§impl<const P: u32, const S: u32> Rem<AnyNumeric> for Numeric<P, S>
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
type Output = AnyNumeric
% operator.source§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for f32
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for f64
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i128
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i16
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i32
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i64
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for i8
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for isize
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u128
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u16
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u32
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u64
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for u8
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§impl<const P: u32, const S: u32> Rem<Numeric<P, S>> for usize
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§impl<const Q: u32, const T: u32> Rem<Numeric<Q, T>> for AnyNumeric
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§impl<const P: u32, const S: u32, const Q: u32, const T: u32> Rem<Numeric<Q, T>> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<f32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<f64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<i128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<i16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<i32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<i64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<i8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<isize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<u128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<u16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<u32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<u64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<u8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Rem<usize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> SqlTranslatable for Numeric<P, S>
impl<const P: u32, const S: u32> SqlTranslatable for Numeric<P, S>
fn argument_sql() -> Result<SqlMapping, ArgumentError>
fn return_sql() -> Result<Returns, ReturnsError>
fn type_name() -> &'static str
fn variadic() -> bool
fn optional() -> bool
fn entity() -> FunctionMetadataTypeEntity
source§impl<const P: u32, const S: u32> Sub<AnyNumeric> for Numeric<P, S>
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
type Output = AnyNumeric
- operator.source§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for f32
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for f64
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i128
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i16
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i32
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i64
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for i8
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for isize
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u128
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u16
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u32
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u64
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for u8
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§impl<const P: u32, const S: u32> Sub<Numeric<P, S>> for usize
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§impl<const Q: u32, const T: u32> Sub<Numeric<Q, T>> for AnyNumeric
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§impl<const P: u32, const S: u32, const Q: u32, const T: u32> Sub<Numeric<Q, T>> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<f32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<f64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<i128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<i16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<i32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<i64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<i8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<isize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<u128> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<u16> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<u32> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<u64> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<u8> for Numeric<P, S>
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§impl<const P: u32, const S: u32> Sub<usize> for Numeric<P, S>
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for i128
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u128
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u16
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u32
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u64
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for u8
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§impl<const P: u32, const S: u32> TryFrom<Numeric<P, S>> for usize
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
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> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
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
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.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
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.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
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.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
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.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
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.