1use tee_internal::Error;
6
7pub mod binding_stubs;
8pub mod context;
9pub mod crypto;
10pub mod mem;
11pub mod props;
12pub mod storage;
13pub mod time;
14
15pub struct ErrorWithSize {
19 pub error: Error,
20 pub size: usize,
21}
22
23impl ErrorWithSize {
24 const fn new(error: Error) -> Self {
25 Self { error, size: 0 }
26 }
27
28 const fn short_buffer(size: usize) -> Self {
29 Self { error: Error::ShortBuffer, size }
30 }
31}
32
33pub fn panic(code: u32) {
34 std::process::exit(code as i32)
35}