extern crate one_user;
#[macro_use]
extern crate lazy_static;
mod test{
use one_user::one_user;
#[one_user]
#[derive(Debug)]
pub struct Test {
item: usize
}
impl Test{
pub fn new(d: usize) -> UnboundTest{
UnboundTest::from(Test{ item: d })
}
}
impl test_binder::OnBind for Test {
fn on_bind<const SLOT: usize>(&mut self) {}
}
}
fn main() {
let mut b = test::TestBouncer::new();
let mut t1 = test::Test::new(1);
let mut t2 = test::Test::new(2);
let bound_t1 = t1.bind(&mut b);
println!("{:?}", *bound_t1);
let bound_t2 = t2.bind(&mut b);
println!("{:?}", *bound_t2);
}