Type Alias Address

Source
pub type Address = Bits<160, 3>;
Expand description

Bits for 160 bits.

Aliased Type§

struct Address(/* private fields */);

Implementations

Source§

impl<const BITS: usize, const LIMBS: usize> Bits<BITS, LIMBS>

Source

pub fn reverse_bits(self) -> Bits<BITS, LIMBS>

See Uint::reverse_bits for documentation.

Source

pub fn as_le_bytes(&self) -> Cow<'_, [u8]>

See Uint::as_le_bytes for documentation.

Source

pub fn to_be_bytes_vec(&self) -> Vec<u8>

See Uint::to_be_bytes_vec for documentation.

Source

pub fn to_le_bytes<const BYTES: usize>(&self) -> [u8; BYTES]

See Uint::to_le_bytes for documentation.

Source

pub fn to_be_bytes<const BYTES: usize>(&self) -> [u8; BYTES]

See Uint::to_be_bytes for documentation.

Source

pub fn leading_zeros(&self) -> usize

See Uint::leading_zeros for documentation.

Source

pub fn leading_ones(&self) -> usize

See Uint::leading_ones for documentation.

Source

pub fn trailing_zeros(&self) -> usize

See Uint::trailing_zeros for documentation.

Source

pub fn trailing_ones(&self) -> usize

See Uint::trailing_ones for documentation.

Source

pub unsafe fn as_limbs_mut(&mut self) -> &mut [u64; LIMBS]

See Uint::as_limbs_mut for documentation.

Source

pub fn checked_shl(self, rhs: usize) -> Option<Bits<BITS, LIMBS>>

See Uint::checked_shl for documentation.

Source

pub fn checked_shr(self, rhs: usize) -> Option<Bits<BITS, LIMBS>>

See Uint::checked_shr for documentation.

Source

pub fn overflowing_shl(self, rhs: usize) -> (Bits<BITS, LIMBS>, bool)

See Uint::overflowing_shl for documentation.

Source

pub fn overflowing_shr(self, rhs: usize) -> (Bits<BITS, LIMBS>, bool)

See Uint::overflowing_shr for documentation.

Source

pub fn wrapping_shl(self, rhs: usize) -> Bits<BITS, LIMBS>

See Uint::wrapping_shl for documentation.

Source

pub fn wrapping_shr(self, rhs: usize) -> Bits<BITS, LIMBS>

See Uint::wrapping_shr for documentation.

Source

pub fn rotate_left(self, rhs: usize) -> Bits<BITS, LIMBS>

See Uint::rotate_left for documentation.

Source

pub fn rotate_right(self, rhs: usize) -> Bits<BITS, LIMBS>

See Uint::rotate_right for documentation.

Source

pub fn try_from_be_slice(bytes: &[u8]) -> Option<Bits<BITS, LIMBS>>

See Uint::try_from_be_slice for documentation.

Source

pub fn try_from_le_slice(bytes: &[u8]) -> Option<Bits<BITS, LIMBS>>

See Uint::try_from_le_slice for documentation.

Source

pub fn from_str_radix( src: &str, radix: u64, ) -> Result<Bits<BITS, LIMBS>, ParseError>

See Uint::from_str_radix for documentation.

Source

pub fn from_be_bytes<const BYTES: usize>( bytes: [u8; BYTES], ) -> Bits<BITS, LIMBS>

See Uint::from_be_bytes for documentation.

Source

pub fn from_le_bytes<const BYTES: usize>( bytes: [u8; BYTES], ) -> Bits<BITS, LIMBS>

See Uint::from_le_bytes for documentation.

Source

pub const fn from_limbs(limbs: [u64; LIMBS]) -> Bits<BITS, LIMBS>

See Uint::from_limbs for documentation.

Source

pub const fn as_limbs(&self) -> &[u64; LIMBS]

See Uint::as_limbs for documentation.

Source§

impl<const BITS: usize, const LIMBS: usize> Bits<BITS, LIMBS>

Source

pub const LIMBS: usize = Uint<BITS, LIMBS>::LIMBS

The size of this integer type in 64-bit limbs.

Source

pub const BITS: usize = Uint<BITS, LIMBS>::BITS

The size of this integer type in bits.

Source

pub const BYTES: usize = Uint<BITS, LIMBS>::BYTES

The size of this integer type in bits.

Source

pub const ZERO: Bits<BITS, LIMBS>

The value zero. This is the only value that exists in all Uint types.

Source

pub const fn into_inner(self) -> Uint<BITS, LIMBS>

Returns the inner Uint.

Source

pub const fn as_uint(&self) -> &Uint<BITS, LIMBS>

Returns a reference to the inner Uint.

Source

pub fn as_uint_mut(&mut self) -> &mut Uint<BITS, LIMBS>

Returns a mutable reference to the inner Uint.

Trait Implementations

Source§

impl<const BITS: usize, const LIMBS: usize> BitAnd<&Bits<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the & operator.
Source§

fn bitand( self, rhs: &Bits<BITS, LIMBS>, ) -> <Bits<BITS, LIMBS> as BitAnd<&Bits<BITS, LIMBS>>>::Output

Performs the & operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitAnd for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Bits<BITS, LIMBS>) -> <Bits<BITS, LIMBS> as BitAnd>::Output

Performs the & operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitAndAssign<&Bits<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

fn bitand_assign(&mut self, rhs: &Bits<BITS, LIMBS>)

Performs the &= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitAndAssign for Bits<BITS, LIMBS>

Source§

fn bitand_assign(&mut self, rhs: Bits<BITS, LIMBS>)

Performs the &= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitOr<&Bits<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the | operator.
Source§

fn bitor( self, rhs: &Bits<BITS, LIMBS>, ) -> <Bits<BITS, LIMBS> as BitOr<&Bits<BITS, LIMBS>>>::Output

Performs the | operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitOr for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Bits<BITS, LIMBS>) -> <Bits<BITS, LIMBS> as BitOr>::Output

Performs the | operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitOrAssign<&Bits<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

fn bitor_assign(&mut self, rhs: &Bits<BITS, LIMBS>)

Performs the |= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitOrAssign for Bits<BITS, LIMBS>

Source§

fn bitor_assign(&mut self, rhs: Bits<BITS, LIMBS>)

Performs the |= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitXor<&Bits<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the ^ operator.
Source§

fn bitxor( self, rhs: &Bits<BITS, LIMBS>, ) -> <Bits<BITS, LIMBS> as BitXor<&Bits<BITS, LIMBS>>>::Output

Performs the ^ operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitXor for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Bits<BITS, LIMBS>) -> <Bits<BITS, LIMBS> as BitXor>::Output

Performs the ^ operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitXorAssign<&Bits<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

fn bitxor_assign(&mut self, rhs: &Bits<BITS, LIMBS>)

Performs the ^= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> BitXorAssign for Bits<BITS, LIMBS>

Source§

fn bitxor_assign(&mut self, rhs: Bits<BITS, LIMBS>)

Performs the ^= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Clone for Bits<BITS, LIMBS>

Source§

fn clone(&self) -> Bits<BITS, LIMBS>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Debug for Bits<BITS, LIMBS>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Default for Bits<BITS, LIMBS>

Source§

fn default() -> Bits<BITS, LIMBS>

Returns the “default value” for a type. Read more
Source§

impl<'de, const BITS: usize, const LIMBS: usize> Deserialize<'de> for Bits<BITS, LIMBS>

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Bits<BITS, LIMBS>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> From<Uint<BITS, LIMBS>> for Bits<BITS, LIMBS>

Source§

fn from(value: Uint<BITS, LIMBS>) -> Bits<BITS, LIMBS>

Converts to this type from the input type.
Source§

impl<const BITS: usize, const LIMBS: usize> FromStr for Bits<BITS, LIMBS>

Source§

type Err = <Uint<BITS, LIMBS> as FromStr>::Err

The associated error which can be returned from parsing.
Source§

fn from_str( src: &str, ) -> Result<Bits<BITS, LIMBS>, <Bits<BITS, LIMBS> as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Hash for Bits<BITS, LIMBS>

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Index<usize> for Bits<BITS, LIMBS>

Source§

type Output = bool

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &<Bits<BITS, LIMBS> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Not for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Bits<BITS, LIMBS>

Performs the unary ! operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> PartialEq for Bits<BITS, LIMBS>

Source§

fn eq(&self, other: &Bits<BITS, LIMBS>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const BITS: usize, const LIMBS: usize> Serialize for Bits<BITS, LIMBS>

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Shl<&usize> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &usize) -> Bits<BITS, LIMBS>

Performs the << operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Shl<usize> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: usize) -> Bits<BITS, LIMBS>

Performs the << operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&usize> for Bits<BITS, LIMBS>

Source§

fn shl_assign(&mut self, rhs: &usize)

Performs the <<= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<usize> for Bits<BITS, LIMBS>

Source§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Shr<&usize> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &usize) -> Bits<BITS, LIMBS>

Performs the >> operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Shr<usize> for Bits<BITS, LIMBS>

Source§

type Output = Bits<BITS, LIMBS>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: usize) -> Bits<BITS, LIMBS>

Performs the >> operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&usize> for Bits<BITS, LIMBS>

Source§

fn shr_assign(&mut self, rhs: &usize)

Performs the >>= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<usize> for Bits<BITS, LIMBS>

Source§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
Source§

impl<const BITS: usize, const LIMBS: usize> Copy for Bits<BITS, LIMBS>

Source§

impl<const BITS: usize, const LIMBS: usize> Eq for Bits<BITS, LIMBS>

Source§

impl<const BITS: usize, const LIMBS: usize> StructuralPartialEq for Bits<BITS, LIMBS>