Struct bigint::Gas
[−]
[src]
pub struct Gas(_);
Methods
impl Gas
[src]
fn zero() -> Gas
[src]
Zero value of Gas,
fn one() -> Gas
[src]
One value of Gas,
fn max_value() -> Gas
[src]
Maximum value of Gas,
fn min_value() -> Gas
[src]
Minimum value of Gas,
fn bits(self) -> usize
[src]
Bits required to represent this value.
fn log2floor(self) -> usize
[src]
Equals floor(log2(*))
. This is always an integer.
fn as_u32(&self) -> u32
[src]
fn as_u64(&self) -> u64
[src]
fn as_usize(&self) -> usize
[src]
Conversion to usize with overflow checking
Panics
Panics if the number is larger than usize::max_value().
Trait Implementations
impl Eq for Gas
[src]
impl PartialEq for Gas
[src]
fn eq(&self, __arg_0: &Gas) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Gas) -> bool
[src]
This method tests for !=
.
impl Debug for Gas
[src]
impl Copy for Gas
[src]
impl Clone for Gas
[src]
fn clone(&self) -> Gas
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Gas
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for Gas
[src]
impl FromStr for Gas
[src]
type Err = ParseHexError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Gas, ParseHexError>
[src]
Parses a string s
to return a value of this type. Read more
impl Encodable for Gas
[src]
fn rlp_append(&self, s: &mut RlpStream)
[src]
Append a value to the stream
fn rlp_bytes(&self) -> ElasticArray1024<u8>
[src]
Get rlp-encoded bytes for this instance
impl Decodable for Gas
[src]
fn decode(rlp: &UntrustedRlp) -> Result<Self, DecoderError>
[src]
Decode a value from RLP bytes
impl From<u64> for Gas
[src]
impl Into<u64> for Gas
[src]
impl From<usize> for Gas
[src]
impl<'a> From<&'a [u8]> for Gas
[src]
impl From<bool> for Gas
[src]
impl From<U256> for Gas
[src]
impl Into<U256> for Gas
[src]
impl From<M256> for Gas
[src]
impl Into<M256> for Gas
[src]
impl Ord for Gas
[src]
fn cmp(&self, other: &Gas) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Gas
[src]
fn partial_cmp(&self, other: &Gas) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Add<Gas> for Gas
[src]
type Output = Gas
The resulting type after applying the +
operator.
fn add(self, other: Gas) -> Gas
[src]
Performs the +
operation.
impl Sub<Gas> for Gas
[src]
type Output = Gas
The resulting type after applying the -
operator.
fn sub(self, other: Gas) -> Gas
[src]
Performs the -
operation.
impl Mul<Gas> for Gas
[src]
type Output = Gas
The resulting type after applying the *
operator.
fn mul(self, other: Gas) -> Gas
[src]
Performs the *
operation.
impl Div for Gas
[src]
type Output = Gas
The resulting type after applying the /
operator.
fn div(self, other: Gas) -> Gas
[src]
Performs the /
operation.
impl Rem for Gas
[src]
type Output = Gas
The resulting type after applying the %
operator.
fn rem(self, other: Gas) -> Gas
[src]
Performs the %
operation.