better_any 0.2.1

Type id and Any for non static types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Tid;


pub trait Provider<'x>: Tid<'x> {
    fn provide<'a>(&self, client: &mut Demand<'x>);
    fn provide_mut<'a>(&'a mut self, client: &mut Demand<'a, 'x>);
}

struct TypedOption<'a, 'x, T:Tid<'x>>(Option<T>);

trait Demander<'a,'x>{
    fn requests_for(&mut self,)
}


pub struct Demand<'a: 'x, 'x>(dyn Demander<'a, 'x> + 'a);