//! **Sh**ared **re**source **d**ispatcher
//!
//! This library allows to dispatch
//! systems, which can have interdependencies,
//! shared and exclusive resource access, in parallel.
//!
//! # Examples
//!
//! ```rust
//! extern crate shred;
//!
//! use shred::{DispatcherBuilder, Read, Resource, ResourceId, System, SystemData, World, Write};
//!
//! #[derive(Debug, Default)]
//! struct ResA;
//!
//! #[derive(Debug, Default)]
//! struct ResB;
//!
//! #[derive(SystemData)] // Provided with `shred-derive` feature
//! struct Data<'a> {
//! a: Read<'a, ResA>,
//! b: Write<'a, ResB>,
//! }
//!
//! struct EmptySystem;
//!
//! impl<'a> System<'a> for EmptySystem {
//! type SystemData = Data<'a>;
//!
//! fn run(&mut self, bundle: Data<'a>) {
//! println!("{:?}", &*bundle.a);
//! println!("{:?}", &*bundle.b);
//! }
//! }
//!
//! fn main() {
//! let mut world = World::empty();
//! let mut dispatcher = DispatcherBuilder::new()
//! .with(EmptySystem, "empty", &[])
//! .build();
//! world.insert(ResA);
//! world.insert(ResB);
//!
//! dispatcher.dispatch(&mut world);
//! }
//! ```
//!
//! Once you are more familiar with how system data and parallelization works,
//! you can take look at a more flexible and performant way to dispatch:
//! `ParSeq`. Using it is bit trickier, but it allows dispatching without any
//! virtual function calls.
/// A reexport of the `#[derive(SystemData]` macro provided by `shred-derive`.
/// This requires that the `shred-derive` feature is enabled.
pub use SystemData;
pub use crate AsyncDispatcher;
pub use crate;
pub use crate::;
/// Alias for `World` for easier migration to the new version. Will be removed
/// in the future.
pub type Resources = World;