Struct rerun::external::re_query::LatestAtComponentResults
source · pub struct LatestAtComponentResults { /* private fields */ }
Expand description
Lazily cached results for a particular component when using a cached latest-at query.
Implementations§
source§impl LatestAtComponentResults
impl LatestAtComponentResults
sourcepub fn dense<C>(&self, resolver: &PromiseResolver) -> Option<&[C]>where
C: Component,
pub fn dense<C>(&self, resolver: &PromiseResolver) -> Option<&[C]>where
C: Component,
Returns the component data as a dense vector.
Logs a warning and returns None
if the component is missing or cannot be deserialized.
sourcepub fn raw(
&self,
resolver: &PromiseResolver,
component_name: impl Into<ComponentName>
) -> Option<Box<dyn Array>>
pub fn raw( &self, resolver: &PromiseResolver, component_name: impl Into<ComponentName> ) -> Option<Box<dyn Array>>
Returns the component data as an arrow array.
Logs a warning and returns None
if the component is missing or cannot be deserialized.
sourcepub fn mono<C>(&self, resolver: &PromiseResolver) -> Option<C>where
C: Component,
pub fn mono<C>(&self, resolver: &PromiseResolver) -> Option<C>where
C: Component,
Returns the component data of the single instance.
This assumes that the row we get from the store contains at most one instance for this component; it will log a warning otherwise.
This should only be used for “mono-components” such as Transform
and Tensor
.
Logs a warning and returns None
if the component is missing or cannot be deserialized.
sourcepub fn mono_raw(
&self,
resolver: &PromiseResolver,
component_name: impl Into<ComponentName>
) -> Option<Box<dyn Array>>
pub fn mono_raw( &self, resolver: &PromiseResolver, component_name: impl Into<ComponentName> ) -> Option<Box<dyn Array>>
Returns the component data of the single instance as an arrow array.
This assumes that the row we get from the store contains at most one instance for this component; it will log a warning otherwise.
This should only be used for “mono-components” such as Transform
and Tensor
.
Logs a warning and returns None
if the component is missing or cannot be deserialized.
sourcepub fn instance<C>(&self, resolver: &PromiseResolver, index: usize) -> Option<C>where
C: Component,
pub fn instance<C>(&self, resolver: &PromiseResolver, index: usize) -> Option<C>where
C: Component,
Returns the component data of the specified instance.
Logs a warning and returns None
if the component is missing or cannot be deserialized, or
the index doesn’t exist.
sourcepub fn instance_raw(
&self,
resolver: &PromiseResolver,
component_name: impl Into<ComponentName>,
index: usize
) -> Option<Box<dyn Array>>
pub fn instance_raw( &self, resolver: &PromiseResolver, component_name: impl Into<ComponentName>, index: usize ) -> Option<Box<dyn Array>>
Returns the component data of the specified instance as an arrow array.
Logs a warning and returns None
if the component is missing or cannot be deserialized, or
the index doesn’t exist.
source§impl LatestAtComponentResults
impl LatestAtComponentResults
pub const fn empty() -> LatestAtComponentResults
sourcepub fn component_name(
&self,
resolver: &PromiseResolver
) -> Option<ComponentName>
pub fn component_name( &self, resolver: &PromiseResolver ) -> Option<ComponentName>
Returns the ComponentName
of the resolved data, if available.
sourcepub fn num_indices(&self) -> u64
pub fn num_indices(&self) -> u64
How many indices across this entire cache?
sourcepub fn num_instances(&self) -> u64
pub fn num_instances(&self) -> u64
How many instances across this entire cache?
source§impl LatestAtComponentResults
impl LatestAtComponentResults
pub fn index(&self) -> &(TimeInt, RowId)
sourcepub fn resolved(&self, resolver: &PromiseResolver) -> PromiseResult<DataCell>
pub fn resolved(&self, resolver: &PromiseResolver) -> PromiseResult<DataCell>
Returns the raw resolved data, if it’s ready.
sourcepub fn to_dense<C>(
&self,
resolver: &PromiseResolver
) -> PromiseResult<Result<&[C], QueryError>>where
C: Component,
pub fn to_dense<C>(
&self,
resolver: &PromiseResolver
) -> PromiseResult<Result<&[C], QueryError>>where
C: Component,
Returns the component data as a dense vector.
Returns an error if the component is missing or cannot be deserialized.
Use PromiseResult::flatten
to merge the results of resolving the promise and of
deserializing the data into a single one, if you don’t need the extra flexibility.
sourcepub fn iter_dense<C>(
&self,
resolver: &PromiseResolver
) -> PromiseResult<Result<impl ExactSizeIterator, QueryError>>where
C: Component,
pub fn iter_dense<C>(
&self,
resolver: &PromiseResolver
) -> PromiseResult<Result<impl ExactSizeIterator, QueryError>>where
C: Component,
Iterates over the component data, assuming it is dense.
Returns an error if the component is missing or cannot be deserialized.
Use PromiseResult::flatten
to merge the results of resolving the promise and of
deserializing the data into a single one, if you don’t need the extra flexibility.
Trait Implementations§
source§impl Debug for LatestAtComponentResults
impl Debug for LatestAtComponentResults
source§impl SizeBytes for LatestAtComponentResults
impl SizeBytes for LatestAtComponentResults
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self
on the heap, in bytes.source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self
in bytes, accounting for both stack and heap space.source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self
on the stack, in bytes. Read moreAuto Trait Implementations§
impl !Freeze for LatestAtComponentResults
impl !RefUnwindSafe for LatestAtComponentResults
impl Send for LatestAtComponentResults
impl Sync for LatestAtComponentResults
impl Unpin for LatestAtComponentResults
impl !UnwindSafe for LatestAtComponentResults
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 more