Enum snarkvm_dpc::virtual_machine::operation::Operation
source · [−]pub enum Operation<N: Network> {
Noop,
Coinbase(Address<N>, AleoAmount),
Transfer(Address<N>, Address<N>, AleoAmount),
Evaluate(N::FunctionID, FunctionType, FunctionInputs<N>),
}
Variants
Noop
Noop.
Coinbase(Address<N>, AleoAmount)
Generates the given amount to the recipient address.
Transfer(Address<N>, Address<N>, AleoAmount)
Transfers the given amount from the caller to the recipient address.
Evaluate(N::FunctionID, FunctionType, FunctionInputs<N>)
Invokes the given records on the function and inputs.
Implementations
sourceimpl<N: Network> Operation<N>
impl<N: Network> Operation<N>
sourcepub fn operation_id(&self) -> u16
pub fn operation_id(&self) -> u16
Returns the operation ID.
pub fn function_id(&self) -> N::FunctionID
pub fn function_type(&self) -> FunctionType
pub fn function_inputs(&self) -> Result<FunctionInputs<N>>
pub fn is_noop(&self) -> bool
pub fn is_coinbase(&self) -> bool
pub fn is_transfer(&self) -> bool
pub fn is_evaluate(&self) -> bool
Trait Implementations
sourceimpl<'de, N: Network> Deserialize<'de> for Operation<N>
impl<'de, N: Network> Deserialize<'de> for Operation<N>
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<N: Network> ToConstraintField<<N as Network>::InnerScalarField> for Operation<N>
impl<N: Network> ToConstraintField<<N as Network>::InnerScalarField> for Operation<N>
fn to_field_elements(
&self
) -> Result<Vec<N::InnerScalarField>, ConstraintFieldError>
impl<N: Network> Eq for Operation<N> where
N: Network,
Auto Trait Implementations
impl<N> RefUnwindSafe for Operation<N> where
N: RefUnwindSafe,
<N as Network>::FunctionID: RefUnwindSafe,
<N as Network>::ProgramAffineCurve: RefUnwindSafe,
impl<N> Send for Operation<N>
impl<N> Sync for Operation<N>
impl<N> Unpin for Operation<N> where
N: Unpin,
<N as Network>::FunctionID: Unpin,
<N as Network>::ProgramAffineCurve: Unpin,
impl<N> UnwindSafe for Operation<N> where
N: UnwindSafe,
<N as Network>::FunctionID: UnwindSafe,
<N as Network>::ProgramAffineCurve: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more