U2048

Type Alias U2048 

Source
pub type U2048 = Uint<{ _ }>;
Expand description

2048-bit unsigned big integer.

Aliased Type§

pub struct U2048 { /* private fields */ }

Implementations§

Source§

impl U2048

Source

pub const fn to_be_bytes(&self) -> [u8; 256]

Serialize as big endian bytes.

Source

pub const fn to_le_bytes(&self) -> [u8; 256]

Serialize as little endian bytes.

Trait Implementations§

Source§

impl Encoding for U2048

Source§

type Repr = [u8; 256]

Byte array representation.
Source§

fn from_be_bytes(bytes: Self::Repr) -> Self

Decode from big endian bytes.
Source§

fn from_le_bytes(bytes: Self::Repr) -> Self

Decode from little endian bytes.
Source§

fn to_be_bytes(&self) -> Self::Repr

Encode to big endian bytes.
Source§

fn to_le_bytes(&self) -> Self::Repr

Encode to little endian bytes.
Source§

impl Split for U2048

Source§

type Output = Uint<{ <$name>::LIMBS / 2 }>

Split output: low/high components of the value.
Source§

fn split(&self) -> (Self::Output, Self::Output)

Split this number in half, returning its low and high components respectively.
Source§

impl SplitMixed<Uint<{ <$name>::LIMBS / 2 }>, Uint<{ <$name>::LIMBS / 2 }>> for U2048

Source§

fn split_mixed(&self) -> (Uint<{ _ }>, Uint<{ _ }>)

Split this number into parts, returning its low and high components respectively.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 256 bytes