hopr_primitive_types::primitives

Type Alias U256

Source
pub type U256 = U256;

Aliased Type§

struct U256(pub [u64; 4]);

Fields§

§0: [u64; 4]

Trait Implementations§

Source§

impl IntoEndian<32> for U256

Source§

fn from_be_bytes<T: AsRef<[u8]>>(bytes: T) -> Self

Create instance from Big Endian bytes. Should panic if size is more than N.
Source§

fn from_le_bytes<T: AsRef<[u8]>>(bytes: T) -> Self

Create instance from Little Endian bytes. Should panic if size is more than N.
Source§

fn to_le_bytes(self) -> [u8; 32]

Convert instance to Little Endian bytes.
Source§

fn to_be_bytes(self) -> [u8; 32]

Convert instance to Big Endian bytes.
Source§

impl UnitaryFloatOps for U256

Source§

fn mul_f64(&self, rhs: f64) -> Result<Self>

Multiply with float in the interval [0.0, 1.0]
Source§

fn div_f64(&self, rhs: f64) -> Result<Self>

Divide by float in the interval (0.0, 1.0]