use std::any::TypeId;
use crate::entity::{ealloc, referrer};
use crate::world;
use crate::world::offline;
pub use crate::world::rw::isotope::read::full::ReadIsotopeFull;
pub use crate::world::rw::isotope::read::partial::ReadIsotopePartial;
pub use crate::world::rw::isotope::write::full::WriteIsotopeFull;
pub use crate::world::rw::isotope::write::partial::WriteIsotopePartial;
pub use crate::world::rw::simple::{ReadSimple, WriteSimple};
pub mod access;
pub use access::{Isotope as AccessIsotope, Single as AccessSingle};
pub mod iter;
pub use iter::{EntityIterator, IntoZip, Try, Zip, ZipChunked};
pub mod partition;
pub use partition::{EntityCreationPartition, Partition};
mod offline_buffer;
pub use offline_buffer::{EntityCreator, EntityDeleter};
pub mod spec;
#[doc(inline)]
pub use spec::Spec;
pub trait Descriptor {
fn get_spec(&self) -> Spec;
fn visit_type(&self, arg: &mut referrer::VisitTypeArg);
fn state_maybe_uninit(&self) -> Vec<TypeId> { Vec::new() }
fn visit_mut(&mut self) -> referrer::AsObject<'_>;
}
pub trait Sendable: Send + Descriptor + 'static {
fn run(
&mut self,
globals: &world::SyncGlobals,
components: &world::Components,
ealloc_shard_map: &mut ealloc::ShardMap,
offline_shard: &mut offline::BufferShard,
);
fn as_descriptor_mut(&mut self) -> &mut dyn Descriptor;
}
pub trait Unsendable: Descriptor + 'static {
fn run(
&mut self,
sync_globals: &world::SyncGlobals,
unsync_globals: &mut world::UnsyncGlobals,
components: &world::Components,
ealloc_shard_map: &mut ealloc::ShardMap,
offline_shard: &mut offline::BufferShard,
);
fn as_descriptor_mut(&mut self) -> &mut dyn Descriptor;
}