Struct bevy_datasize::MemoryConfig [−][src]
pub struct MemoryConfig {
pub global: bool,
pub additional_mesh_vertex_attributes: Vec<&'static str>,
}
Expand description
Configuration for the MemoryUsagePlugin
.
Fields
global: bool
Whether to track memory usage for all registered types.
additional_mesh_vertex_attributes: Vec<&'static str>
A list of additional Mesh
vertex attributes to track.
If the plugin is tracking meshes, then by default, it will only account
for data stored in the “built-in” vertex attributes of Mesh
.
If your meshes have any custom attributes, you’ll need to specify them here in order for their memory usage to be tracked.
This is due to the fact that, currently, Mesh
has no method to
iterate through its attributes.
Implementations
Returns a new MemoryConfig
in its default state, except that
global
is false
.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnwindSafe for MemoryConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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. Read more
Compare self to key
and return true
if they are equal.
Creates Self
using data from the given MemoryConfig
.
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
pub fn from_world(_world: &mut World) -> T
Creates Self
using data from the given [World]
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more