pub trait BasicOps {
// Required methods
fn pow(&self, exponent: u32) -> Self;
fn mul(&self, other: &Self) -> Self;
fn sub(&self, other: &Self) -> Self;
fn add(&self, other: &Self) -> Self;
fn abs(&self) -> Self;
}Expand description
Provides basic arithmetic operators for BigInt
Note that BigInt also implements std::ops::{Add, Mull, …} traits, so you can use them instead.
Required Methods§
fn pow(&self, exponent: u32) -> Self
fn mul(&self, other: &Self) -> Self
fn sub(&self, other: &Self) -> Self
fn add(&self, other: &Self) -> Self
fn abs(&self) -> Self
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.