dope_sys/io/reactor/read/
source.rs1use crate::{
2 io::reactor::{
3 read::{Arm, Complete, Context},
4 ready,
5 },
6 memory,
7 memory::buffer,
8 table,
9 table::{change, registry},
10};
11
12pub trait Source: buffer::Source + table::Source {
13 type Registry<C: Context>: registry::State<C::Slots, Self::Entry<C>, Files = Self::Files<C::Slots>>;
14 type Entry<C: Context>: super::raw::Entry<C, File = <<Self::Files<C::Slots> as table::Files<C::Slots>>::Changes as change::Changes>::Id>;
15 type Arm<'a, C, E, P>: Arm<
16 'a,
17 C,
18 E,
19 P,
20 Files = Self::Files<C::Slots>,
21 Entry = Self::Entry<C>,
22 Registry = Self::Registry<C>,
23 Failure = P::Failure,
24 >
25 where
26 C: Context + 'a,
27 C::Slots: 'a,
28 E: Complete<Key = C::Key, Flow = C::Flow>,
29 P: ready::Poll<
30 C::Slots,
31 Files = Self::Files<C::Slots>,
32 Failure: ready::Failure<Operation = C::Operation>,
33 > + 'a,
34 Self::Files<C::Slots>: 'a,
35 Self::Registry<C>: 'a;
36 type Poll<'a, C, L, E, P>: super::raw::Poll<'a, C, L, E, P, Arm = Self::Arm<'a, C, E, P>, Pool = Self::Pool<L>>
37 where
38 C: Context + 'a,
39 C::Slots: 'a,
40 L: memory::raw::Layout + 'a,
41 E: Complete<
42 Key = C::Key,
43 Flow = C::Flow,
44 Accepted = <C::Slots as table::raw::Slots>::Accepted,
45 Buffer = <Self::Pool<L> as buffer::Pool>::Buffer,
46 >,
47 P: ready::Poll<
48 C::Slots,
49 Files = Self::Files<C::Slots>,
50 Failure: ready::Failure<Operation = C::Operation>,
51 > + 'a,
52 Self::Files<C::Slots>: 'a,
53 Self::Registry<C>: 'a,
54 Self::Pool<L>: 'a;
55}