Struct re_viewer_context::space_view::visualizer_entity_subscriber::VisualizerEntitySubscriber
source · pub struct VisualizerEntitySubscriber {
visualizer: ViewSystemIdentifier,
indicator_components: ComponentNameSet,
required_components_indices: IntMap<ComponentName, usize>,
per_store_mapping: HashMap<StoreId, VisualizerEntityMapping>,
applicability_filter: Box<dyn VisualizerAdditionalApplicabilityFilter>,
}
Expand description
A store subscriber that keep track which entities in a store can be processed by a single given visualizer type.
The list of entities is additive: If an entity was at any point in time applicable to the visualizer, it will be kept in the list of entities.
Applicability is determined by the visualizer’s set of required components.
There’s only a single entity subscriber per visualizer type.
This means that if the same visualizer is used in multiple space views, only a single
VisualizerEntitySubscriber
is created for all of them.
Fields§
§visualizer: ViewSystemIdentifier
Visualizer type this subscriber is associated with.
indicator_components: ComponentNameSet
§required_components_indices: IntMap<ComponentName, usize>
Assigns each required component an index.
per_store_mapping: HashMap<StoreId, VisualizerEntityMapping>
§applicability_filter: Box<dyn VisualizerAdditionalApplicabilityFilter>
Additional filter for applicability.
Implementations§
source§impl VisualizerEntitySubscriber
impl VisualizerEntitySubscriber
pub fn new<T: IdentifiedViewSystem + VisualizerSystem>(visualizer: &T) -> Self
sourcepub fn applicable_entities(
&self,
store: &StoreId
) -> Option<&ApplicableEntities>
pub fn applicable_entities( &self, store: &StoreId ) -> Option<&ApplicableEntities>
List of entities that are applicable to the visualizer.
sourcepub fn indicated_entities(&self, store: &StoreId) -> Option<&IndicatedEntities>
pub fn indicated_entities(&self, store: &StoreId) -> Option<&IndicatedEntities>
List of entities that at some point in time had any of the indicator components advertised by this visualizer.
Useful for quickly evaluating basic “should this visualizer apply by default”-heuristic. Does not imply that any of the given entities is also in the applicable-set!
If the visualizer has no indicator components, this list will contain all entities in the store.
Trait Implementations§
source§impl ChunkStoreSubscriber for VisualizerEntitySubscriber
impl ChunkStoreSubscriber for VisualizerEntitySubscriber
source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
self
: Read moresource§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
self
: Read moresource§fn on_events(&mut self, events: &[ChunkStoreEvent])
fn on_events(&mut self, events: &[ChunkStoreEvent])
ChunkStore
s. Read moreAuto Trait Implementations§
impl Freeze for VisualizerEntitySubscriber
impl !RefUnwindSafe for VisualizerEntitySubscriber
impl Send for VisualizerEntitySubscriber
impl Sync for VisualizerEntitySubscriber
impl Unpin for VisualizerEntitySubscriber
impl !UnwindSafe for VisualizerEntitySubscriber
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