1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use std::fmt;
use std::pin::Pin;
use futures::{Future, Stream};
use tc_error::*;
pub mod id;
pub mod map;
pub mod stream;
pub mod time;
pub mod tuple;
pub use id::*;
pub use map::*;
pub use stream::*;
pub use time::*;
pub use tuple::*;
pub type TCBoxTryFuture<'a, T> = Pin<Box<dyn Future<Output = TCResult<T>> + Send + 'a>>;
pub type TCTryStream<'a, T> = Pin<Box<dyn Stream<Item = TCResult<T>> + Send + Unpin + 'a>>;
pub trait Class: fmt::Display + Sized {}
pub trait NativeClass: Class {
fn from_path(path: &[PathSegment]) -> Option<Self>;
fn path(&self) -> TCPathBuf;
}
pub trait Instance: Send + Sync {
type Class: Class;
fn class(&self) -> Self::Class;
}