pub struct VMInputs {
pub owned_inputs: Vec<OwnedState>,
pub global_state: Vec<GlobalState>,
pub metadata: Vec<Metadata>,
pub seal_data: Vec<u8>,
}Expand description
Input state for VM execution
Contains all state that must be consumed as input to a transition, including owned states, global state, metadata, and seal data.
Fields§
§owned_inputs: Vec<OwnedState>Owned states being consumed (resolved from StateRef)
global_state: Vec<GlobalState>Current global state values
metadata: Vec<Metadata>Transition metadata
seal_data: Vec<u8>Seal data being consumed (authorizes this transition)
Implementations§
Source§impl VMInputs
impl VMInputs
Sourcepub fn new(
owned_inputs: Vec<OwnedState>,
global_state: Vec<GlobalState>,
metadata: Vec<Metadata>,
seal_data: Vec<u8>,
) -> Self
pub fn new( owned_inputs: Vec<OwnedState>, global_state: Vec<GlobalState>, metadata: Vec<Metadata>, seal_data: Vec<u8>, ) -> Self
Create new VM inputs
Sourcepub fn global_state_of(&self, type_id: StateTypeId) -> Vec<&GlobalState>
pub fn global_state_of(&self, type_id: StateTypeId) -> Vec<&GlobalState>
Look up a global state by type ID
Sourcepub fn owned_state_of(&self, type_id: StateTypeId) -> Vec<&OwnedState>
pub fn owned_state_of(&self, type_id: StateTypeId) -> Vec<&OwnedState>
Look up owned states by type ID
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VMInputs
impl<'de> Deserialize<'de> for VMInputs
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VMInputs
impl StructuralPartialEq for VMInputs
Auto Trait Implementations§
impl Freeze for VMInputs
impl RefUnwindSafe for VMInputs
impl Send for VMInputs
impl Sync for VMInputs
impl Unpin for VMInputs
impl UnsafeUnpin for VMInputs
impl UnwindSafe for VMInputs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more