Skip to main content

Crate pybevy_storage

Crate pybevy_storage 

Source
Expand description

PyO3-free storage primitives for PyBevy

This crate provides the foundational storage types that are independent of PyO3, enabling reuse from both the CPython (PyO3) and RustPython/WASM backends.

§Storage Primitives

  • ValidityFlag / ValidityFlagWithMode - Runtime validity tracking
  • ValidityGuard - RAII guard for system execution scope
  • ValueStorage<T> - Generic storage for Copy types (Vec3, Quat, etc.)
  • FieldStorage<T> - Generic storage for non-Copy types (TextureAtlas, etc.)
  • ComponentStorage<T> - Generic storage for ECS components
  • ResourceStorage<T> - Generic storage for ECS resources
  • AssetStorage<T> - Generic storage for Bevy assets
  • ListStorage<T> - Generic storage for Vec fields
  • BorrowableStorage / FromBorrowedStorage - Traits for borrowed field access

Re-exports§

pub use component_storage::ComponentStorage;
pub use component_storage::ComponentStorageInner;
pub use field_storage::FieldStorage;
pub use field_storage::FieldStorageInner;
pub use list_storage::ListStorage;
pub use list_storage::ListStorageInner;
pub use list_storage::normalize_index;
pub use resource_storage::ResourceStorage;
pub use resource_storage::ResourceStorageInner;
pub use storage::AssetStorage;
pub use storage_error::StorageError;
pub use storage_traits::BorrowableStorage;
pub use storage_traits::FromBorrowedStorage;
pub use validity_guard::AccessMode;
pub use validity_guard::ValidityFlag;
pub use validity_guard::ValidityFlagWithMode;
pub use validity_guard::ValidityGuard;
pub use value_storage::ValueStorage;
pub use value_storage::ValueStorageInner;
pub use view_bridge::FieldOffset;
pub use view_bridge::ViewBridge;
pub use view_bridge::ViewFieldAccess;

Modules§

component_storage
Generic component storage supporting both owned and borrowed instances
field_storage
Generic field storage supporting both owned and borrowed instances
list_storage
Generic list storage supporting both owned and borrowed Vec instances
resource_storage
Generic resource storage supporting both owned and borrowed instances
storage
Storage types for PyBevy wrappers
storage_error
PyO3-independent error types for storage operations
storage_traits
Core storage traits for PyBevy
validity_guard
Runtime validity checking for system parameters
value_storage
Generic value storage supporting both owned and borrowed instances
view_bridge
View API bridge trait for runtime type dispatch

Macros§

impl_py_list
Macro to generate Python list wrappers for borrowed Vec fields.