Struct vapcore_builtin::Builtin [−][src]
Pricing scheme, execution definition, and activation block for a built-in contract.
Call cost to compute cost for the given input, execute to execute the contract
on the given input, and is_active to determine whether the contract is active.
Implementations
impl Builtin[src]
pub fn cost(&self, input: &[u8], at: u64) -> U256[src]
Simple forwarder for cost.
Return the cost of the most recently activated pricer at the current block number.
If no pricer is actived zero is returned
If multiple activation_at has the same block number the last one is used
(follows BTreeMap semantics).
pub fn execute(
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>[src]
&self,
input: &[u8],
output: &mut BytesRef<'_>
) -> Result<(), &'static str>
Simple forwarder for execute.
pub fn is_active(&self, at: u64) -> bool[src]
Whether the builtin is activated at the given block number.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builtin
impl Send for Builtin
impl Sync for Builtin
impl Unpin for Builtin
impl UnwindSafe for Builtin
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> From<T> for T[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, 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>,