proof_of_sql::base::scalar

Trait ScalarExt

Source
pub trait ScalarExt: Scalar {
    // Provided methods
    fn pow10(exponent: u8) -> Self { ... }
    fn signed_cmp(&self, other: &Self) -> Ordering { ... }
}
Expand description

Extention trait for blanket implementations for Scalar types. This trait is primarily to avoid cluttering the core Scalar implementation with default implemenentations and provides helper methods for Scalar.

Provided Methods§

Source

fn pow10(exponent: u8) -> Self

Compute 10^exponent for the Scalar. Note that we do not check for overflow.

Source

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

Compare two Scalars as signed numbers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S: Scalar> ScalarExt for S