Struct bevy_stat_query::BaseStatMap
source · pub struct BaseStatMap<Q: QualifierFlag>(/* private fields */);Expand description
A map containing associated output value of stats.
Implementations§
source§impl<Q: QualifierFlag> BaseStatMap<Q>
impl<Q: QualifierFlag> BaseStatMap<Q>
pub fn new() -> Self
sourcepub fn unqualified(&self) -> &Unqualified<Self>
pub fn unqualified(&self) -> &Unqualified<Self>
Obtain an unqualified view.
sourcepub fn unqualified_mut(&mut self) -> &mut Unqualified<Self>
pub fn unqualified_mut(&mut self) -> &mut Unqualified<Self>
Obtain an mutable unqualified view.
pub fn clear(&mut self)
pub fn insert<S: Stat>( &mut self, qualifier: Qualifier<Q>, stat: S, value: <<S as Stat>::Data as StatValue>::Out )
pub fn get<S: Stat>( &self, qualifier: &Qualifier<Q>, stat: &S ) -> Option<&<<S as Stat>::Data as StatValue>::Out>
pub fn get_mut<S: Stat>( &mut self, qualifier: &Qualifier<Q>, stat: &S ) -> Option<&mut <<S as Stat>::Data as StatValue>::Out>
pub fn remove<S: Stat>( &mut self, qualifier: &Qualifier<Q>, stat: &S ) -> Option<<<S as Stat>::Data as StatValue>::Out>
pub fn retain(&mut self, f: impl FnMut(&Qualifier<Q>, &dyn Any) -> bool)
Trait Implementations§
source§impl<Q: Clone + QualifierFlag> Clone for BaseStatMap<Q>
impl<Q: Clone + QualifierFlag> Clone for BaseStatMap<Q>
source§fn clone(&self) -> BaseStatMap<Q>
fn clone(&self) -> BaseStatMap<Q>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<Q: QualifierFlag> Component for BaseStatMap<Q>
impl<Q: QualifierFlag> Component for BaseStatMap<Q>
§type Storage = TableStorage
type Storage = TableStorage
A marker type indicating the storage type used for this component.
This must be either
TableStorage or SparseStorage.source§impl<Q: Debug + QualifierFlag> Debug for BaseStatMap<Q>
impl<Q: Debug + QualifierFlag> Debug for BaseStatMap<Q>
source§impl<Q: Default + QualifierFlag> Default for BaseStatMap<Q>
impl<Q: Default + QualifierFlag> Default for BaseStatMap<Q>
source§fn default() -> BaseStatMap<Q>
fn default() -> BaseStatMap<Q>
Returns the “default value” for a type. Read more
source§impl<Q: QualifierFlag> ExternalStream<Q> for BaseStatMap<Q>
impl<Q: QualifierFlag> ExternalStream<Q> for BaseStatMap<Q>
type Ctx = ()
type QueryData = Option<&'static BaseStatMap<Q>>
fn stream( _: &<Self::Ctx as SystemParam>::Item<'_, '_>, this: <Self::QueryData as WorldQuery>::Item<'_>, qualifier: &QualifierQuery<Q>, pair: &mut StatValuePair<'_>, _: &mut QuerierRef<'_, Q> )
source§impl<Q: QualifierFlag> IntrinsicStream<Q> for BaseStatMap<Q>
impl<Q: QualifierFlag> IntrinsicStream<Q> for BaseStatMap<Q>
source§fn distance(
_: &<Self::Ctx as SystemParam>::Item<'_, '_>,
_: <Self::QueryData as WorldQuery>::Item<'_>,
_: <Self::QueryData as WorldQuery>::Item<'_>,
_: &QualifierQuery<Q>,
_: &mut StatValuePair<'_>,
_: &mut QuerierRef<'_, Q>
)
fn distance( _: &<Self::Ctx as SystemParam>::Item<'_, '_>, _: <Self::QueryData as WorldQuery>::Item<'_>, _: <Self::QueryData as WorldQuery>::Item<'_>, _: &QualifierQuery<Q>, _: &mut StatValuePair<'_>, _: &mut QuerierRef<'_, Q> )
Write to
stat and return true if a value is written.source§impl<Q: QualifierFlag + SerdeProject> SerdeProject for BaseStatMap<Q>
impl<Q: QualifierFlag + SerdeProject> SerdeProject for BaseStatMap<Q>
source§impl<Q: QualifierFlag> StatelessStream<Q> for BaseStatMap<Q>
impl<Q: QualifierFlag> StatelessStream<Q> for BaseStatMap<Q>
fn stat_extend( &self, qualifier: &QualifierQuery<Q>, pair: &mut StatValuePair<'_> )
source§impl<Q> TypePath for BaseStatMap<Q>
impl<Q> TypePath for BaseStatMap<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>
Auto Trait Implementations§
impl<Q> Freeze for BaseStatMap<Q>
impl<Q> !RefUnwindSafe for BaseStatMap<Q>
impl<Q> Send for BaseStatMap<Q>
impl<Q> Sync for BaseStatMap<Q>
impl<Q> Unpin for BaseStatMap<Q>
impl<Q> !UnwindSafe for BaseStatMap<Q>
Blanket Implementations§
source§impl<T> BevyObject for Twhere
T: SerdeProject + Component,
impl<T> BevyObject for Twhere
T: SerdeProject + Component,
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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId) )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
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>
Convert
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.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&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> DowncastSync for T
impl<T> DowncastSync for T
source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
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 data from the given World.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>
Converts
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>
Converts
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