Struct re_viewer_context::space_view::view_query::DataResult
source · pub struct DataResult {
pub entity_path: EntityPath,
pub visualizers: SmallVisualizerSet,
pub tree_prefix_only: bool,
pub property_overrides: PropertyOverrides,
}
Expand description
This is the primary mechanism through which data is passed to a SpaceView
.
It contains everything necessary to properly use this data in the context of the
ViewSystem
s that it is a part of.
Fields§
§entity_path: EntityPath
Where to retrieve the data from.
visualizers: SmallVisualizerSet
Which ViewSystems
s to pass the DataResult
to.
tree_prefix_only: bool
If true, this path is not actually included in the query results and is just here because of a common prefix.
If this is true, visualizers
must be empty.
property_overrides: PropertyOverrides
The accumulated property overrides for this DataResult
.
Implementations§
source§impl DataResult
impl DataResult
pub const INDIVIDUAL_OVERRIDES_PREFIX: &'static str = "individual_overrides"
pub const RECURSIVE_OVERRIDES_PREFIX: &'static str = "recursive_overrides"
pub fn recursive_override_path(&self) -> &EntityPath
pub fn individual_override_path(&self) -> &EntityPath
sourcepub fn save_recursive_override_or_clear_if_redundant<C: Component + Eq + Default>(
&self,
ctx: &ViewerContext<'_>,
data_result_tree: &DataResultTree,
desired_override: &C
)
pub fn save_recursive_override_or_clear_if_redundant<C: Component + Eq + Default>( &self, ctx: &ViewerContext<'_>, data_result_tree: &DataResultTree, desired_override: &C )
Saves a recursive override OR clears both (!) individual & recursive overrides if the override is due to a parent recursive override or a default value.
fn lookup_override<C: 'static + Component>( &self, ctx: &ViewerContext<'_> ) -> Option<C>
sourcepub fn component_override_source(
&self,
result_tree: &DataResultTree,
component_name: ComponentName
) -> Option<EntityPath>
pub fn component_override_source( &self, result_tree: &DataResultTree, component_name: ComponentName ) -> Option<EntityPath>
Returns from which entity path an override originates from.
Returns None if there was no override at all. Note that if this returns the current path, the override might be either an individual or recursive override.
sourcepub fn is_inherited(
&self,
result_tree: &DataResultTree,
component_name: ComponentName
) -> bool
pub fn is_inherited( &self, result_tree: &DataResultTree, component_name: ComponentName ) -> bool
Returns true if the current component’s value was inherited from a parent entity.
sourcepub fn is_visible(&self, ctx: &ViewerContext<'_>) -> bool
pub fn is_visible(&self, ctx: &ViewerContext<'_>) -> bool
Shorthand for checking for visibility on data overrides.
Note that this won’t check if the chunk store has visibility logged.
sourcepub fn is_interactive(&self, ctx: &ViewerContext<'_>) -> bool
pub fn is_interactive(&self, ctx: &ViewerContext<'_>) -> bool
Shorthand for checking for interactivity on data overrides.
Note that this won’t check if the chunk store has interactivity logged.
sourcepub fn query_range(&self) -> &QueryRange
pub fn query_range(&self) -> &QueryRange
Returns the query range for this data result.
Trait Implementations§
source§impl Clone for DataResult
impl Clone for DataResult
source§fn clone(&self) -> DataResult
fn clone(&self) -> DataResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for DataResult
impl RefUnwindSafe for DataResult
impl Send for DataResult
impl Sync for DataResult
impl Unpin for DataResult
impl UnwindSafe for DataResult
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>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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