Struct sputnikvm::M256
[−]
[src]
pub struct M256(pub U256);
Represent an unsigned modulo 256-bit integer
Methods
impl M256
[src]
fn zero() -> M256
Zero value of M256,
fn one() -> M256
One value of M256,
fn max_value() -> M256
Maximum value of M256,
fn min_value() -> M256
Minimum value of M256,
fn bits(self) -> usize
Bits required to represent this value.
fn log2floor(self) -> usize
Equals floor(log2(*))
. This is always an integer.
fn as_u32(&self) -> u32
fn as_u64(&self) -> u64
fn as_usize(&self) -> usize
Conversion to usize with overflow checking
Panics
Panics if the number is larger than usize::max_value().
fn byte(&self, index: usize) -> u8
fn index(&self, index: usize) -> u8
Return specific byte in big-endian format.
Panics
Panics if index
exceeds the byte width of the number.
Trait Implementations
impl Clone for M256
[src]
fn clone(&self) -> M256
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialOrd<M256> for M256
[src]
fn partial_cmp(&self, other: &M256) -> Option<Ordering>
impl Into<u64> for M256
[src]
impl Into<U256> for M256
[src]
impl Into<U512> for M256
[src]
impl Default for M256
[src]
impl BitOr<M256> for M256
[src]
type Output = M256
The resulting type after applying the |
operator
fn bitor(self, other: M256) -> M256
The method for the |
operator
impl Copy for M256
[src]
impl Add<M256> for M256
[src]
type Output = M256
The resulting type after applying the +
operator
fn add(self, other: M256) -> M256
The method for the +
operator
impl Div<M256> for M256
[src]
type Output = M256
The resulting type after applying the /
operator
fn div(self, other: M256) -> M256
The method for the /
operator
impl Ord for M256
[src]
impl Rem<M256> for M256
[src]
type Output = M256
The resulting type after applying the %
operator
fn rem(self, other: M256) -> M256
The method for the %
operator
impl Mul<M256> for M256
[src]
type Output = M256
The resulting type after applying the *
operator
fn mul(self, other: M256) -> M256
The method for the *
operator
impl PartialEq<M256> for M256
[src]
fn eq(&self, __arg_0: &M256) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &M256) -> bool
This method tests for !=
.
impl Decodable for M256
[src]
fn decode(rlp: &UntrustedRlp) -> Result<M256, DecoderError>
impl Sub<M256> for M256
[src]
type Output = M256
The resulting type after applying the -
operator
fn sub(self, other: M256) -> M256
The method for the -
operator
impl LowerHex for M256
[src]
impl UpperHex for M256
[src]
impl BitAnd<M256> for M256
[src]
type Output = M256
The resulting type after applying the &
operator
fn bitand(self, other: M256) -> M256
The method for the &
operator
impl FromStr for M256
[src]
type Err = ParseHexError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<M256, ParseHexError>
Parses a string s
to return a value of this type. Read more
impl From<u64> for M256
[src]
impl<'a> From<&'a [u8]> for M256
[src]
impl From<i32> for M256
[src]
impl From<H160> for M256
[src]
impl From<U256> for M256
[src]
impl From<bool> for M256
[src]
impl From<H256> for M256
[src]
impl From<usize> for M256
[src]
impl From<U512> for M256
[src]
impl Shl<usize> for M256
[src]
impl Shr<usize> for M256
[src]
impl BitXor<M256> for M256
[src]
type Output = M256
The resulting type after applying the ^
operator
fn bitxor(self, other: M256) -> M256
The method for the ^
operator