pub struct QueryOutput {
pub spec: Rc<FindSpec>,
pub results: QueryResults,
}Fields§
§spec: Rc<FindSpec>§results: QueryResultsImplementations§
Source§impl QueryOutput
impl QueryOutput
pub fn empty_factory(spec: &FindSpec) -> Box<dyn Fn() -> QueryResults>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn empty(spec: &Rc<FindSpec>) -> QueryOutput
pub fn from_constants( spec: &Rc<FindSpec>, bindings: BTreeMap<Variable, TypedValue>, ) -> QueryResults
pub fn into_scalar(self) -> Result<Option<Binding>, ProjectorError>
pub fn into_coll(self) -> Result<Vec<Binding>, ProjectorError>
Sourcepub fn into_tuple<B>(self) -> Result<Option<B>, ProjectorError>where
B: BindingTuple,
pub fn into_tuple<B>(self) -> Result<Option<B>, ProjectorError>where
B: BindingTuple,
Mentat tuple results can be expressed as multiple different data structures. Some structures are generic (vectors) and some are easier for pattern matching (fixed length tuples).
This is the moral equivalent of collect (and BindingTuple of FromIterator), but
specialized to tuples of expected length.
pub fn into_rel(self) -> Result<RelResult<Binding>, ProjectorError>
Trait Implementations§
Source§impl Clone for QueryOutput
impl Clone for QueryOutput
Source§fn clone(&self) -> QueryOutput
fn clone(&self) -> QueryOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 QueryOutput
impl Debug for QueryOutput
impl Eq for QueryOutput
Source§impl From<QueryOutput> for QueryResults
impl From<QueryOutput> for QueryResults
Source§fn from(o: QueryOutput) -> QueryResults
fn from(o: QueryOutput) -> QueryResults
Converts to this type from the input type.
Source§impl PartialEq for QueryOutput
impl PartialEq for QueryOutput
impl StructuralPartialEq for QueryOutput
Auto Trait Implementations§
impl !Freeze for QueryOutput
impl !Send for QueryOutput
impl !Sync for QueryOutput
impl RefUnwindSafe for QueryOutput
impl Unpin for QueryOutput
impl UnsafeUnpin for QueryOutput
impl UnwindSafe for QueryOutput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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