shipyard 0.6.2

Entity Component System
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use shipyard::*;
use std::rc::Rc;

// ANCHOR: non_send_sync
#[derive(Unique)]
struct RcU32(Rc<u32>);
#[derive(Component)]
struct RcUSIZE(Rc<usize>);

#[allow(unused)]
fn run(rcs_usize: NonSendSync<View<RcUSIZE>>, rc_u32: NonSendSync<UniqueView<RcU32>>) {}
// ANCHOR_END: non_send_sync

#[test]
#[should_panic]
fn test() {
    World::new().run(run);
}