pub struct QueryStateReads {
pub state_read: Vec<StateReadBytecode>,
pub index: SolutionDataIndex,
pub solution: Solution,
pub request_type: StateReadRequestType,
}
Expand description
Query the results of running an ordered list of state read programs.
The query can be derived from a solution, or be inline. The request type can be for just the keys and values read, or for the slots read or both.
Fields§
§state_read: Vec<StateReadBytecode>
The programs that read state.
index: SolutionDataIndex
The index of the solution data that is used for the state query,
solution: Solution
The solution for this query.
request_type: StateReadRequestType
The type of results for this request.
Implementations§
Source§impl QueryStateReads
impl QueryStateReads
Sourcepub fn from_solution(
solution: Solution,
index: SolutionDataIndex,
predicate: &Predicate,
request_type: StateReadRequestType,
) -> Self
pub fn from_solution( solution: Solution, index: SolutionDataIndex, predicate: &Predicate, request_type: StateReadRequestType, ) -> Self
Create a query from a solution and a predicate.
It is assumed the provided predicate is the predicate that the solution data at the provided index is solving. This is not checked.
Sourcepub fn inline_empty(
state_read: Vec<StateReadBytecode>,
request_type: StateReadRequestType,
) -> Self
pub fn inline_empty( state_read: Vec<StateReadBytecode>, request_type: StateReadRequestType, ) -> Self
Create a query that only reads external state. The predicate address is zeroed out.
Sourcepub fn inline(
state_read: Vec<StateReadBytecode>,
data: SolutionData,
request_type: StateReadRequestType,
) -> Self
pub fn inline( state_read: Vec<StateReadBytecode>, data: SolutionData, request_type: StateReadRequestType, ) -> Self
Create an inline query from state reads and a single solution data.
Trait Implementations§
Source§impl Clone for QueryStateReads
impl Clone for QueryStateReads
Source§fn clone(&self) -> QueryStateReads
fn clone(&self) -> QueryStateReads
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for QueryStateReads
impl Debug for QueryStateReads
Source§impl<'de> Deserialize<'de> for QueryStateReads
impl<'de> Deserialize<'de> for QueryStateReads
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
Source§impl PartialEq for QueryStateReads
impl PartialEq for QueryStateReads
Source§impl Serialize for QueryStateReads
impl Serialize for QueryStateReads
impl StructuralPartialEq for QueryStateReads
Auto Trait Implementations§
impl Freeze for QueryStateReads
impl RefUnwindSafe for QueryStateReads
impl Send for QueryStateReads
impl Sync for QueryStateReads
impl Unpin for QueryStateReads
impl UnwindSafe for QueryStateReads
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