pub struct GlobalStatRelations<Q: QualifierFlag> { /* private fields */ }
Expand description
Resource
that stores global StatStream
s that runs on every query.
Implementations§
Source§impl<Q: QualifierFlag> GlobalStatRelations<Q>
impl<Q: QualifierFlag> GlobalStatRelations<Q>
pub fn push( &mut self, stream: impl Fn(Entity, &QualifierQuery<Q>, &mut StatValuePair, Querier<'_, Q>) + Send + Sync + 'static, ) -> &mut Self
pub fn with( self, stream: impl Fn(Entity, &QualifierQuery<Q>, &mut StatValuePair, Querier<'_, Q>) + Send + Sync + 'static, ) -> Self
Trait Implementations§
Source§impl<Q: QualifierFlag> Debug for GlobalStatRelations<Q>
impl<Q: QualifierFlag> Debug for GlobalStatRelations<Q>
Source§impl<Q: QualifierFlag> Default for GlobalStatRelations<Q>
impl<Q: QualifierFlag> Default for GlobalStatRelations<Q>
Source§impl<Q: QualifierFlag> StatStream for GlobalStatRelations<Q>
impl<Q: QualifierFlag> StatStream for GlobalStatRelations<Q>
type Qualifier = Q
fn stream_stat( &self, entity: Entity, qualifier: &QualifierQuery<Q>, stat_value: &mut StatValuePair, querier: Querier<'_, Q>, )
fn stream_relation( &self, other: &Self, entity: Entity, target: Entity, qualifier: &QualifierQuery<Self::Qualifier>, stat_value: &mut StatValuePair, querier: Querier<'_, Self::Qualifier>, )
fn has_attribute(&self, entity: Entity, attribute: Attribute<'_>) -> bool
Source§impl<Q> TypePath for GlobalStatRelations<Q>
impl<Q> TypePath for GlobalStatRelations<Q>
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Returns the fully qualified path of the underlying type. Read more
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Returns a short, pretty-print enabled path to the type. Read more
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
impl<Q: QualifierFlag> Resource for GlobalStatRelations<Q>
Auto Trait Implementations§
impl<Q> Freeze for GlobalStatRelations<Q>
impl<Q> !RefUnwindSafe for GlobalStatRelations<Q>
impl<Q> Send for GlobalStatRelations<Q>
impl<Q> Sync for GlobalStatRelations<Q>
impl<Q> Unpin for GlobalStatRelations<Q>
impl<Q> !UnwindSafe for GlobalStatRelations<Q>
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
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
See
TypePath::type_path
.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
See
TypePath::type_ident
.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
See
TypePath::crate_name
.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self
using default()
.