[][src]Struct solana_libra_vm::gas_schedule::GasPrice

pub struct GasPrice<GasCarrier>(_);

A newtype wrapper around the gas price for each unit of gas consumed.

Trait Implementations

impl GasAlgebra<u64> for GasPrice<GasCarrier>[src]

fn map<F: Fn(GasCarrier) -> GasCarrier>(self, f: F) -> Self[src]

Map a function f of one argument over the underlying data.

fn map2<F: Fn(GasCarrier, GasCarrier) -> GasCarrier>(
    self,
    other: impl GasAlgebra<GasCarrier>,
    f: F
) -> Self
[src]

Map a function f of two arguments over the underlying carrier. Note that this function can take two different implementations of the trait -- one for self the other for the second argument. But, we enforce that they have the same underlying carrier. Read more

fn app<T, F: Fn(GasCarrier, GasCarrier) -> T>(
    &self,
    other: &impl GasAlgebra<GasCarrier>,
    f: F
) -> T
[src]

Apply a function f of two arguments to the carrier. Since f is not an endomophism, we return the resulting value, as opposed to the result wrapped up in ourselves. Read more

fn unitary_cast<T: GasAlgebra<GasCarrier>>(self) -> T[src]

We allow casting between GasAlgebras as long as they have the same underlying carrier -- i.e. they use the same type to store the underlying value. Read more

fn add(self, right: impl GasAlgebra<GasCarrier>) -> Self[src]

Add the two GasAlgebras together.

fn sub(self, right: impl GasAlgebra<GasCarrier>) -> Self[src]

Subtract one GasAlgebra from the other.

fn mul(self, right: impl GasAlgebra<GasCarrier>) -> Self[src]

Multiply two GasAlgebras together.

fn div(self, right: impl GasAlgebra<GasCarrier>) -> Self[src]

Divide one GasAlgebra by the other.

impl<GasCarrier: Clone> Clone for GasPrice<GasCarrier>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<GasCarrier: PartialEq> PartialEq<GasPrice<GasCarrier>> for GasPrice<GasCarrier>[src]

impl<GasCarrier: Copy> Copy for GasPrice<GasCarrier>[src]

impl<GasCarrier: Eq> Eq for GasPrice<GasCarrier>[src]

impl<GasCarrier: Debug> Debug for GasPrice<GasCarrier>[src]

impl<GasCarrier: Hash> Hash for GasPrice<GasCarrier>[src]

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

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<GasCarrier> Sync for GasPrice<GasCarrier> where
    GasCarrier: Sync

impl<GasCarrier> Send for GasPrice<GasCarrier> where
    GasCarrier: Send

impl<GasCarrier> Unpin for GasPrice<GasCarrier> where
    GasCarrier: Unpin

impl<GasCarrier> RefUnwindSafe for GasPrice<GasCarrier> where
    GasCarrier: RefUnwindSafe

impl<GasCarrier> UnwindSafe for GasPrice<GasCarrier> where
    GasCarrier: UnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]