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
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("cannot convert `name` to a C string")]
NameCStringConversion(#[source] std::ffi::NulError),
#[error("cannot create memfd")]
Create(#[source] std::io::Error),
#[error("cannot add seals to the memfd")]
AddSeals(#[source] std::io::Error),
#[error("cannot read seals for a memfd")]
GetSeals(#[source] std::io::Error),
}
#[cfg(test)]
#[test]
fn error_send_sync() {
fn assert_error<E: std::error::Error + Send + Sync + 'static>() {}
assert_error::<Error>();
}