pub struct ProvableQueryResult { /* private fields */ }
Expand description
An intermediate form of a query result that can be transformed to either the finalized query result form or a query error
Implementations§
Source§impl ProvableQueryResult
impl ProvableQueryResult
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
The number of columns in the result
Sourcepub fn table_length(&self) -> usize
pub fn table_length(&self) -> usize
The number of rows in the result
Sourcepub fn new<'a, S: Scalar>(
table_length: u64,
columns: &'a [Column<'a, S>],
) -> Self
pub fn new<'a, S: Scalar>( table_length: u64, columns: &'a [Column<'a, S>], ) -> Self
Form intermediate query result from index rows and result columns
§Panics
Will panic if table_length
is somehow larger than the length of some column
which should never happen.
Sourcepub fn evaluate<S: Scalar>(
&self,
evaluation_point: &[S],
output_length: usize,
column_result_fields: &[ColumnField],
) -> Result<Vec<S>, QueryError>
pub fn evaluate<S: Scalar>( &self, evaluation_point: &[S], output_length: usize, column_result_fields: &[ColumnField], ) -> Result<Vec<S>, QueryError>
Given an evaluation vector, compute the evaluation of the intermediate result columns as spare multilinear extensions
§Panics
This function will panic if the length of evaluation_point
does not match self.num_columns
.
It will also panic if the data
array is not properly formatted for the expected column types.
Sourcepub fn to_owned_table<S: Scalar>(
&self,
column_result_fields: &[ColumnField],
) -> Result<OwnedTable<S>, QueryError>
pub fn to_owned_table<S: Scalar>( &self, column_result_fields: &[ColumnField], ) -> Result<OwnedTable<S>, QueryError>
Convert the intermediate query result into a final query result
The result is essentially an OwnedTable
type.
Trait Implementations§
Source§impl Clone for ProvableQueryResult
impl Clone for ProvableQueryResult
Source§fn clone(&self) -> ProvableQueryResult
fn clone(&self) -> ProvableQueryResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProvableQueryResult
impl Debug for ProvableQueryResult
Source§impl Default for ProvableQueryResult
impl Default for ProvableQueryResult
Source§fn default() -> ProvableQueryResult
fn default() -> ProvableQueryResult
Source§impl<'de> Deserialize<'de> for ProvableQueryResult
impl<'de> Deserialize<'de> for ProvableQueryResult
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>,
Auto Trait Implementations§
impl Freeze for ProvableQueryResult
impl RefUnwindSafe for ProvableQueryResult
impl Send for ProvableQueryResult
impl Sync for ProvableQueryResult
impl Unpin for ProvableQueryResult
impl UnwindSafe for ProvableQueryResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more