Struct casper_execution_engine::shared::host_function_costs::HostFunction [−][src]
Representation of a host function cost
Total gas cost is equal to cost + sum of each argument weight multiplied by the byte size of
the data.
Implementations
impl<T> HostFunction<T>[src]
impl<T> HostFunction<T> where
T: Default, [src]
T: Default,
impl<T> HostFunction<T> where
T: AsRef<[Cost]>, [src]
T: AsRef<[Cost]>,
pub fn arguments(&self) -> &[Cost][src]
pub fn calculate_gas_cost(&self, weights: T) -> Gas[src]
Calculate gas cost for a host function
Trait Implementations
impl<T: Clone> Clone for HostFunction<T>[src]
fn clone(&self) -> HostFunction<T>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T: Copy> Copy for HostFunction<T>[src]
impl<T> DataSize for HostFunction<T> where
T: DataSize, [src]
T: DataSize,
const IS_DYNAMIC: bool[src]
const STATIC_HEAP_SIZE: usize[src]
fn estimate_heap_size(&self) -> usize[src]
impl<T: Debug> Debug for HostFunction<T>[src]
impl<T> Default for HostFunction<T> where
T: Default, [src]
T: Default,
impl<'de, T> Deserialize<'de> for HostFunction<T> where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl<T: Eq> Eq for HostFunction<T>[src]
impl<T> FromBytes for HostFunction<T> where
T: Default + AsMut<[Cost]>, [src]
T: Default + AsMut<[Cost]>,
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>[src]
pub fn from_vec(
bytes: Vec<u8, Global>
) -> Result<(Self, Vec<u8, Global>), Error>[src]
bytes: Vec<u8, Global>
) -> Result<(Self, Vec<u8, Global>), Error>
impl<T: PartialEq> PartialEq<HostFunction<T>> for HostFunction<T>[src]
fn eq(&self, other: &HostFunction<T>) -> bool[src]
fn ne(&self, other: &HostFunction<T>) -> bool[src]
impl<T> Serialize for HostFunction<T> where
T: Serialize, [src]
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl<T> StructuralEq for HostFunction<T>[src]
impl<T> StructuralPartialEq for HostFunction<T>[src]
impl<T> ToBytes for HostFunction<T> where
T: AsRef<[Cost]>, [src]
T: AsRef<[Cost]>,
Auto Trait Implementations
impl<T> RefUnwindSafe for HostFunction<T> where
T: RefUnwindSafe, [src]
T: RefUnwindSafe,
impl<T> Send for HostFunction<T> where
T: Send, [src]
T: Send,
impl<T> Sync for HostFunction<T> where
T: Sync, [src]
T: Sync,
impl<T> Unpin for HostFunction<T> where
T: Unpin, [src]
T: Unpin,
impl<T> UnwindSafe for HostFunction<T> where
T: UnwindSafe, [src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone, [src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,