Trait planck_ecs_bundle::Bundle[][src]

pub trait Bundle {
    fn systems() -> Vec<System>;

    fn insert(builder: DispatcherBuilder) -> DispatcherBuilder { ... }

A trait allowing the creation of bundles. Bundles are groups of Systems that are added together and in order in a DispatcherBuilder.


use world_dispatcher::*;
use planck_ecs_bundle::*;
struct TestBundle;
impl Bundle for TestBundle {
    fn systems() -> Vec<System> {
            (|| {Ok(())}).system(),
            (|| {Ok(())}).system(),
            (|| {println!("hello!"); Ok(())}).system(),
let mut builder = DispatcherBuilder::default();
    builder = TestBundle::insert(builder);

Required methods

fn systems() -> Vec<System>[src]

Returns all the systems of this bundle. This should normally be the only function you need to implement.

Loading content...

Provided methods

fn insert(builder: DispatcherBuilder) -> DispatcherBuilder[src]

Inserts the systems of this bundle into the provided DispatcherBuilder. A default implementation is already provided for you.

Loading content...


Loading content...