lockless_split/lib.rs
1pub trait LocklessSplit {
2 /// Owned Read Split
3 type OwnedRead;
4 /// Owned Write Split
5 type OwnedWrite;
6
7 /// Borrowed Read Split
8 type Read<'cx>
9 where
10 Self: 'cx;
11 /// Borrowed Write Split
12 type Write<'cx>
13 where
14 Self: 'cx;
15
16 /// Split into owned parts
17 fn into_split(self) -> (Self::OwnedRead, Self::OwnedWrite);
18}
19
20pub trait LocklessSplitRef {
21 /// Borrowed Read Split
22 type Read<'cx>
23 where
24 Self: 'cx;
25 /// Borrowed Write Split
26 type Write<'cx>
27 where
28 Self: 'cx;
29
30 /// Split into borrowed parts
31 fn split(&mut self) -> (Self::Read<'_>, Self::Write<'_>);
32}