Skip to main content

OddBoxedUint

Type Alias OddBoxedUint 

Source
pub type OddBoxedUint = Odd<BoxedUint>;
Expand description

Odd boxed unsigned integer.

Aliased Type§

#[repr(transparent)]
pub struct OddBoxedUint(pub(crate) BoxedUint);

Tuple Fields§

§0: BoxedUint

Implementations§

Source§

impl OddBoxedUint

Source

pub const fn as_uint_ref(&self) -> &OddUintRef

Borrow this OddBoxedUint as a &OddUintRef.

Source

pub fn random<R: TryRng + ?Sized>(rng: &mut R, bit_length: u32) -> Self

Generate a random Odd<Uint<T>>.

Trait Implementations§

Source§

impl AsRef<Odd<UintRef>> for OddBoxedUint

Available on crate feature alloc only.
Source§

fn as_ref(&self) -> &OddUintRef

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Resize for &OddBoxedUint

Available on crate feature alloc only.
Source§

type Output = Odd<BoxedUint>

The result of the resizing.
Source§

fn resize_unchecked(self, at_least_bits_precision: u32) -> Self::Output

Resizes to the minimum storage that fits at_least_bits_precision without checking if the bit size of self is larger than at_least_bits_precision. Read more
Source§

fn try_resize(self, at_least_bits_precision: u32) -> Option<Self::Output>

Resizes to the minimum storage that fits at_least_bits_precision returning None if the bit size of self is larger than at_least_bits_precision. Read more
Source§

fn resize(self, at_least_bits_precision: u32) -> Self::Output

Resizes to the minimum storage that fits at_least_bits_precision panicking if the bit size of self is larger than at_least_bits_precision. Read more
Source§

impl Resize for OddBoxedUint

Available on crate feature alloc only.
Source§

type Output = Odd<BoxedUint>

The result of the resizing.
Source§

fn resize_unchecked(self, at_least_bits_precision: u32) -> Self::Output

Resizes to the minimum storage that fits at_least_bits_precision without checking if the bit size of self is larger than at_least_bits_precision. Read more
Source§

fn try_resize(self, at_least_bits_precision: u32) -> Option<Self::Output>

Resizes to the minimum storage that fits at_least_bits_precision returning None if the bit size of self is larger than at_least_bits_precision. Read more
Source§

fn resize(self, at_least_bits_precision: u32) -> Self::Output

Resizes to the minimum storage that fits at_least_bits_precision panicking if the bit size of self is larger than at_least_bits_precision. Read more