pub trait BigIntApiImpl: HandleTypeInfo + ErrorApi {
Show 23 methods
// Required methods
fn bi_new(&self, value: i64) -> Self::BigIntHandle;
fn bi_set_int64(&self, destination: Self::BigIntHandle, value: i64);
fn bi_to_i64(&self, handle: Self::BigIntHandle) -> Option<i64>;
fn bi_add(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_sub(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_mul(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_t_div(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_t_mod(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_abs(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle);
fn bi_neg(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle);
fn bi_sign(&self, x: Self::BigIntHandle) -> Sign;
fn bi_cmp(&self, x: Self::BigIntHandle, y: Self::BigIntHandle) -> Ordering;
fn bi_sqrt(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle);
fn bi_pow(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_log2(&self, x: Self::BigIntHandle) -> i32;
fn bi_and(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_or(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_xor(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
);
fn bi_shr(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
bits: usize,
);
fn bi_shl(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
bits: usize,
);
fn bi_to_string(
&self,
bi_handle: Self::BigIntHandle,
str_handle: Self::ManagedBufferHandle,
);
// Provided methods
fn bi_new_zero(&self) -> Self::BigIntHandle { ... }
fn bi_sub_unsigned(
&self,
dest: Self::BigIntHandle,
x: Self::BigIntHandle,
y: Self::BigIntHandle,
) { ... }
}
Expand description
Definition of the BigInt type required by the API.
Required Methods§
fn bi_new(&self, value: i64) -> Self::BigIntHandle
fn bi_set_int64(&self, destination: Self::BigIntHandle, value: i64)
fn bi_to_i64(&self, handle: Self::BigIntHandle) -> Option<i64>
fn bi_add( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_sub( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_mul( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_t_div( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_t_mod( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_abs(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle)
fn bi_neg(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle)
fn bi_sign(&self, x: Self::BigIntHandle) -> Sign
fn bi_cmp(&self, x: Self::BigIntHandle, y: Self::BigIntHandle) -> Ordering
fn bi_sqrt(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle)
fn bi_pow( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_log2(&self, x: Self::BigIntHandle) -> i32
fn bi_and( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_or( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_xor( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
fn bi_shr(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle, bits: usize)
fn bi_shl(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle, bits: usize)
fn bi_to_string( &self, bi_handle: Self::BigIntHandle, str_handle: Self::ManagedBufferHandle, )
Provided Methods§
fn bi_new_zero(&self) -> Self::BigIntHandle
fn bi_sub_unsigned( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle, )
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.