pub struct RangeResults {
pub query: RangeQuery,
pub missing_virtual: Vec<ChunkId>,
pub components: IntMap<ComponentIdentifier, Vec<Chunk>>,
}Expand description
Results for a range query.
The data is both deserialized and resolved/converted.
Use RangeResults::get or RangeResults::get_required in order to access the results for
each individual component.
Since the introduction of virtual/offloaded chunks, it is possible for a query to detect that
it is missing some data in order to compute accurate results.
This lack of data is communicated using a non-empty RangeResults::missing_virtual field.
Fields§
§query: RangeQueryThe query that yielded these results.
missing_virtual: Vec<ChunkId>The relevant virtual chunks that were found for this query.
Until these chunks have been fetched and inserted into the appropriate ChunkStore, the
results of this query cannot accurately be computed.
Note, these are NOT necessarily root chunks.
Use ChunkStore::find_root_chunks to get those.
components: IntMap<ComponentIdentifier, Vec<Chunk>>Results for each individual component.
Implementations§
Source§impl RangeResults
impl RangeResults
Sourcepub fn is_partial(&self) -> bool
pub fn is_partial(&self) -> bool
Returns true if these are partial results.
Partial results happen when some of the chunks required to accurately compute the query are currently missing/offloaded. It is then the responsibility of the caller to look into the missing chunk IDs, fetch them, load them, and then try the query again.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the results are completely empty.
I.e. neither physical/loaded nor virtual/offloaded chunks could be found.
Sourcepub fn get(&self, component: ComponentIdentifier) -> Option<&[Chunk]>
pub fn get(&self, component: ComponentIdentifier) -> Option<&[Chunk]>
Returns the Chunks for the specified component.
Sourcepub fn get_required(&self, component: ComponentIdentifier) -> Result<&[Chunk]>
pub fn get_required(&self, component: ComponentIdentifier) -> Result<&[Chunk]>
Returns the Chunks for the specified component.
Returns an error if the component is not present.
Trait Implementations§
Source§impl Debug for RangeResults
impl Debug for RangeResults
Source§impl PartialEq for RangeResults
impl PartialEq for RangeResults
impl StructuralPartialEq for RangeResults
Auto Trait Implementations§
impl Freeze for RangeResults
impl !RefUnwindSafe for RangeResults
impl Send for RangeResults
impl Sync for RangeResults
impl Unpin for RangeResults
impl UnsafeUnpin for RangeResults
impl !UnwindSafe for RangeResults
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request