fxfs_crypt/
log.rs
1pub use log::{debug, error, info, warn};
6
7pub trait AsValue<'a> {
8 type ValueType;
9
10 fn as_value(&'a self) -> Self::ValueType;
11}
12
13impl<'a> AsValue<'a> for anyhow::Error {
14 type ValueType = &'a (dyn std::error::Error + 'static);
15
16 fn as_value(&'a self) -> Self::ValueType {
17 self.as_ref()
18 }
19}
20
21impl<'a> AsValue<'a> for fidl::Error {
22 type ValueType = &'a (dyn std::error::Error + 'static);
23
24 fn as_value(&'a self) -> Self::ValueType {
25 self
26 }
27}