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
use std::alloc::Layout;
mod cast;
pub mod diff;
pub mod gc;
pub mod mapping;
pub mod prelude {
pub use crate::diff::{diff, Diff, FieldDiff, FieldEditKind};
pub use crate::mapping::{Action, FieldMapping};
}
pub trait TypeDesc: Send + Sync {
fn name(&self) -> &str;
fn guid(&self) -> &abi::Guid;
fn group(&self) -> abi::TypeGroup;
}
pub trait TypeMemory: Send + Sync {
fn layout(&self) -> Layout;
fn is_stack_allocated(&self) -> bool;
}
pub trait TypeFields<T>: Send + Sync {
fn fields(&self) -> Vec<(&str, T)>;
fn offsets(&self) -> &[u16];
}