We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Bundles
1 parent b34833f commit 42b928bCopy full SHA for 42b928b
crates/bevy_ecs/src/bundle.rs
@@ -1473,6 +1473,21 @@ pub struct Bundles {
1473
}
1474
1475
impl Bundles {
1476
+ /// The total number of [`Bundle`] registered in [`Storages`].
1477
+ pub fn len(&self) -> usize {
1478
+ self.bundle_infos.len()
1479
+ }
1480
+
1481
+ /// Returns true if no [`Bundle`] registered in [`Storages`].
1482
+ pub fn is_empty(&self) -> bool {
1483
+ self.len() == 0
1484
1485
1486
+ /// Iterate over [`BundleInfo`].
1487
+ pub fn iter(&self) -> impl Iterator<Item = &BundleInfo> {
1488
+ self.bundle_infos.iter()
1489
1490
1491
/// Gets the metadata associated with a specific type of bundle.
1492
/// Returns `None` if the bundle is not registered with the world.
1493
#[inline]
0 commit comments