Struct dittolive_ditto::store::dql::QueryResult
source · [−]pub struct QueryResult { /* private fields */ }
Expand description
Represents results returned when executing a DQL query containing
a QueryResultItem
for each match.
Note: More info such as metrics, affected document IDs, etc. will be provided in the near future.
Implementations
sourceimpl QueryResult
impl QueryResult
sourcepub fn get_item(&self, index: usize) -> Option<QueryResultItem>
pub fn get_item(&self, index: usize) -> Option<QueryResultItem>
Get the QueryResultItem
at the given index.
Return None
if out of bounds.
sourcepub fn item_count(&self) -> usize
pub fn item_count(&self) -> usize
Return the number of available QueryResultItem
.
sourcepub fn mutated_document_ids(&self) -> Vec<DocumentId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn mutated_document_ids(&self) -> Vec<DocumentId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
IDs of documents that were mutated by the DQL query. Empty array if no documents have been mutated.
Important: The returned document IDs are not cached, make sure to call this method once and keep the return value for as long as needed.
sourceimpl QueryResult
impl QueryResult
pub fn iter(&self) -> impl '_ + Iterator<Item = QueryResultItem>
Trait Implementations
sourceimpl From<Box<DqlResponse>> for QueryResult
impl From<Box<DqlResponse>> for QueryResult
sourcefn from(raw: Box<DqlResponse>) -> QueryResult
fn from(raw: Box<DqlResponse>) -> QueryResult
Converts to this type from the input type.
sourceimpl<'iter> IntoIterator for &'iter QueryResult
impl<'iter> IntoIterator for &'iter QueryResult
Auto Trait Implementations
impl RefUnwindSafe for QueryResult
impl Send for QueryResult
impl Sync for QueryResult
impl Unpin for QueryResult
impl UnwindSafe for QueryResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CompatExt for T
impl<T> CompatExt for T
fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Applies the [
Compat
] adapter by shared reference. Read morefn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Applies the [
Compat
] adapter by mutable reference. Read more