Struct bigint::Gas
[−]
[src]
pub struct Gas(_);
Methods
impl Gas
[src]
fn zero() -> Gas
Zero value of Gas,
fn one() -> Gas
One value of Gas,
fn max_value() -> Gas
Maximum value of Gas,
fn min_value() -> Gas
Minimum value of Gas,
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().
Trait Implementations
impl Eq for Gas
[src]
impl PartialEq for Gas
[src]
fn eq(&self, __arg_0: &Gas) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Gas) -> bool
This method tests for !=
.
impl Debug for Gas
[src]
impl Copy for Gas
[src]
impl Clone for Gas
[src]
fn clone(&self) -> Gas
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 Hash for Gas
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
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>
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)
Append a value to the stream
fn rlp_bytes(&self) -> ElasticArray1024<u8>
Get rlp-encoded bytes for this instance
impl Decodable for Gas
[src]
fn decode(rlp: &UntrustedRlp) -> Result<Self, DecoderError>
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
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl PartialOrd for Gas
[src]
fn partial_cmp(&self, other: &Gas) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
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
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
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
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
The method for the +
operator
impl Sub<Gas> for Gas
[src]
type Output = Gas
The resulting type after applying the -
operator
fn sub(self, other: Gas) -> Gas
The method for the -
operator
impl Mul<Gas> for Gas
[src]
type Output = Gas
The resulting type after applying the *
operator
fn mul(self, other: Gas) -> Gas
The method for the *
operator
impl Div for Gas
[src]
type Output = Gas
The resulting type after applying the /
operator
fn div(self, other: Gas) -> Gas
The method for the /
operator
impl Rem for Gas
[src]
type Output = Gas
The resulting type after applying the %
operator
fn rem(self, other: Gas) -> Gas
The method for the %
operator