pub struct BigIntModularNumeric<const BYTES: usize>;Expand description
Parametric N-byte modular-arithmetic impl of BigIntAxis.
BYTES is the operand width in bytes (8 * BYTES bits). Arithmetic
is mod 2^(8 * BYTES) (wrapping). The supported range is
[1, MAX_BIG_INT_BYTES] (512 bits at the upper bound).
Trait Implementations§
Source§impl<const BYTES: usize> AxisExtension for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> AxisExtension for BigIntModularNumeric<BYTES>
Source§const AXIS_ADDRESS: &'static str = <BigIntModularNumeric<BYTES> as BigIntAxis>::AXIS_ADDRESS
const AXIS_ADDRESS: &'static str = <BigIntModularNumeric<BYTES> as BigIntAxis>::AXIS_ADDRESS
ADR-017 content address of this axis trait. The SDK macro
derives this from the trait name and method signatures.
Source§const MAX_OUTPUT_BYTES: usize = <BigIntModularNumeric<BYTES> as BigIntAxis>::MAX_OUTPUT_BYTES
const MAX_OUTPUT_BYTES: usize = <BigIntModularNumeric<BYTES> as BigIntAxis>::MAX_OUTPUT_BYTES
Maximum bytes any kernel of this axis returns.
Source§fn dispatch_kernel(
kernel_id: u32,
input: &[u8],
out: &mut [u8],
) -> Result<usize, ShapeViolation>
fn dispatch_kernel( kernel_id: u32, input: &[u8], out: &mut [u8], ) -> Result<usize, ShapeViolation>
Dispatch the kernel identified by
kernel_id against the
evaluated input bytes. The implementation copies the kernel’s
output into out and returns the written length. Read moreSource§impl<const BYTES: usize> BigIntAxis for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> BigIntAxis for BigIntModularNumeric<BYTES>
Source§const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/BigIntAxis/Modular"
const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/BigIntAxis/Modular"
ADR-017 content address.
Source§const MAX_OUTPUT_BYTES: usize = BYTES
const MAX_OUTPUT_BYTES: usize = BYTES
Operand byte-width (overridden per impl).
Source§impl<const BYTES: usize> Clone for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> Clone for BigIntModularNumeric<BYTES>
Source§fn clone(&self) -> BigIntModularNumeric<BYTES>
fn clone(&self) -> BigIntModularNumeric<BYTES>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const BYTES: usize> Debug for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> Debug for BigIntModularNumeric<BYTES>
Source§impl<const BYTES: usize> Default for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> Default for BigIntModularNumeric<BYTES>
Source§fn default() -> BigIntModularNumeric<BYTES>
fn default() -> BigIntModularNumeric<BYTES>
Returns the “default value” for a type. Read more
Source§impl<const BYTES: usize> SubstrateTermBody for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> SubstrateTermBody for BigIntModularNumeric<BYTES>
Source§fn body_arena() -> &'static [Term]
fn body_arena() -> &'static [Term]
The Term arena the kernel decomposes to. Empty slice signals a
primitive-fast-path axis whose body the implementation may evaluate
through
dispatch_kernel directly per ADR-055’s optional fast-path.impl<const BYTES: usize> Copy for BigIntModularNumeric<BYTES>
Auto Trait Implementations§
impl<const BYTES: usize> Freeze for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> RefUnwindSafe for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> Send for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> Sync for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> Unpin for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> UnsafeUnpin for BigIntModularNumeric<BYTES>
impl<const BYTES: usize> UnwindSafe for BigIntModularNumeric<BYTES>
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
Mutably borrows from an owned value. Read more