1 |
pub trait ToFfi {
|
2 |
fn to_ffi_bytes(&self) -> Vec<u8>;
|
3 |
}
|
4 |
|
5 |
pub trait FromFfi: Sized {
|
6 |
fn from_ffi_bytes(bytes: &[u8]) -> Option<Self>;
|
7 |
}
|
8 |
|
9 |
pub trait FfiLabel {
|
10 |
fn prefix(&self) -> &'static str;
|
11 |
|
12 |
fn type_label(&self) -> &'static str;
|
13 |
}
|
14 |
|