pub enum QueryResult<'s, S>{
Single(&'s Data<S>),
Multiple(Vec<QueryMatch<'s, S>>),
None,
}Expand description
Result of a data query operation
Variants§
Single(&'s Data<S>)
Single value expected and found
Multiple(Vec<QueryMatch<'s, S>>)
Multiple values from wildcard or global recursion
None
No matches found
Implementations§
Source§impl<'s, S> QueryResult<'s, S>
impl<'s, S> QueryResult<'s, S>
Sourcepub fn multiple(&self) -> Option<&[QueryMatch<'s, S>]>
pub fn multiple(&self) -> Option<&[QueryMatch<'s, S>]>
Get multiple matches if available
Trait Implementations§
Source§impl<'s, S> Clone for QueryResult<'s, S>
impl<'s, S> Clone for QueryResult<'s, S>
Source§fn clone(&self) -> QueryResult<'s, S>
fn clone(&self) -> QueryResult<'s, S>
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<'s, S> Debug for QueryResult<'s, S>
impl<'s, S> Debug for QueryResult<'s, S>
Source§impl<'s, S> PartialEq for QueryResult<'s, S>
impl<'s, S> PartialEq for QueryResult<'s, S>
Source§fn eq(&self, other: &QueryResult<'s, S>) -> bool
fn eq(&self, other: &QueryResult<'s, S>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'s, S> StructuralPartialEq for QueryResult<'s, S>
Auto Trait Implementations§
impl<'s, S> Freeze for QueryResult<'s, S>
impl<'s, S> RefUnwindSafe for QueryResult<'s, S>where
S: RefUnwindSafe,
impl<'s, S> Send for QueryResult<'s, S>where
S: Sync,
impl<'s, S> Sync for QueryResult<'s, S>where
S: Sync,
impl<'s, S> Unpin for QueryResult<'s, S>
impl<'s, S> UnsafeUnpin for QueryResult<'s, S>
impl<'s, S> UnwindSafe for QueryResult<'s, S>where
S: RefUnwindSafe,
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