shred 0.16.1

Dispatches systems in parallel which need read access to some resources, and write access to others.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg(not(feature = "parallel"))]

use std::rc::Rc;

use shred::World;

#[derive(Default, PartialEq)]
struct ResNonSend(Rc<u32>);

#[test]
fn non_send_resource_is_accepted() {
    let mut world = World::empty();
    world.insert(ResNonSend(Rc::new(123)));

    let res_non_send = world.fetch::<ResNonSend>();
    assert_eq!(123, *res_non_send.0);
}