pub struct BigIntFixed<const L: usize> { /* private fields */ }Expand description
Fixed-length BigInt with const-generic limb count.
This type uses a fixed-size array and is suitable for VM registers and fixed-width cryptographic types.
Implementations§
Source§impl<const L: usize> BigIntFixed<L>
impl<const L: usize> BigIntFixed<L>
Sourcepub fn from_limbs(limbs: &[Limb]) -> Result<Self>
pub fn from_limbs(limbs: &[Limb]) -> Result<Self>
Create a BigIntFixed from a slice of limbs.
If the slice is longer than L, this will truncate. If shorter, the remaining limbs will be zero.
Sourcepub fn as_limbs_mut(&mut self) -> &mut [Limb; L]
pub fn as_limbs_mut(&mut self) -> &mut [Limb; L]
Get a mutable reference to the limb array.
Trait Implementations§
Source§impl<const L: usize> BigIntCore for BigIntFixed<L>
impl<const L: usize> BigIntCore for BigIntFixed<L>
Source§fn limb_count(&self) -> usize
fn limb_count(&self) -> usize
Get the number of limbs.
Source§impl<const L: usize> Clone for BigIntFixed<L>
impl<const L: usize> Clone for BigIntFixed<L>
Source§fn clone(&self) -> BigIntFixed<L>
fn clone(&self) -> BigIntFixed<L>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const L: usize> Debug for BigIntFixed<L>
impl<const L: usize> Debug for BigIntFixed<L>
impl<const L: usize> Copy for BigIntFixed<L>
Auto Trait Implementations§
impl<const L: usize> Freeze for BigIntFixed<L>
impl<const L: usize> RefUnwindSafe for BigIntFixed<L>
impl<const L: usize> Send for BigIntFixed<L>
impl<const L: usize> Sync for BigIntFixed<L>
impl<const L: usize> Unpin for BigIntFixed<L>
impl<const L: usize> UnwindSafe for BigIntFixed<L>
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