extern crate one_user;
#[macro_use]
extern crate lazy_static;
mod test{
use core::fmt::Debug;
use one_user::one_user;
#[one_user]
#[derive(Debug)]
pub struct Test<T> {
item: T
}
impl<T> Test<T> {
pub fn new(d: T) -> UnboundTest<T>{
UnboundTest::from(Test{ item: d })
}
}
impl<T> test_binder::OnBind for Test<T> {
fn on_bind<const SLOT: usize>(&self) {}
}
}
fn main() {
let mut b = test::TestBouncer::new();
let t1 = test::Test::new(1);
let 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);
}