[−][src]Struct solana_libra_vm::gas_schedule::GasPrice
A newtype wrapper around the gas price for each unit of gas consumed.
Trait Implementations
impl GasAlgebra<u64> for GasPrice<GasCarrier>
[src]
fn new(c: GasCarrier) -> Self
[src]
fn get(&self) -> 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]
self,
other: impl GasAlgebra<GasCarrier>,
f: F
) -> Self
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]
&self,
other: &impl GasAlgebra<GasCarrier>,
f: F
) -> T
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 GasAlgebra
s 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 GasAlgebra
s 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(&self) -> 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]
fn eq(&self, other: &GasPrice<GasCarrier>) -> bool
[src]
fn ne(&self, other: &GasPrice<GasCarrier>) -> bool
[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]
Auto Trait Implementations
impl<GasCarrier> Sync for GasPrice<GasCarrier> where
GasCarrier: Sync,
GasCarrier: Sync,
impl<GasCarrier> Send for GasPrice<GasCarrier> where
GasCarrier: Send,
GasCarrier: Send,
impl<GasCarrier> Unpin for GasPrice<GasCarrier> where
GasCarrier: Unpin,
GasCarrier: Unpin,
impl<GasCarrier> RefUnwindSafe for GasPrice<GasCarrier> where
GasCarrier: RefUnwindSafe,
GasCarrier: RefUnwindSafe,
impl<GasCarrier> UnwindSafe for GasPrice<GasCarrier> where
GasCarrier: UnwindSafe,
GasCarrier: UnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Erased for T
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,