conjure_object/
log_safety.rs1pub trait LogSafe {}
21
22#[derive(serde::Serialize)]
27pub struct AssertLogSafe<T>(pub T);
28impl<T> LogSafe for AssertLogSafe<T> {}
29
30#[cfg(feature = "log-safety")]
33pub trait MaybeLogSafe: LogSafe {}
34
35#[cfg(feature = "log-safety")]
36impl<T: LogSafe> MaybeLogSafe for T {}
37
38#[cfg(not(feature = "log-safety"))]
41pub trait MaybeLogSafe {}
42
43#[cfg(not(feature = "log-safety"))]
44impl<T> MaybeLogSafe for T {}
45
46impl LogSafe for crate::Uuid {}
48
49impl<T: LogSafe + ?Sized> LogSafe for &T {}
51impl<T: LogSafe + ?Sized> LogSafe for &mut T {}
52impl<T: LogSafe + ?Sized> LogSafe for Box<T> {}
53impl<T: LogSafe + ?Sized> LogSafe for std::rc::Rc<T> {}
54impl<T: LogSafe + ?Sized> LogSafe for std::sync::Arc<T> {}
55impl<T: LogSafe> LogSafe for Option<T> {}
56impl<T: LogSafe> LogSafe for Vec<T> {}
57impl<T: LogSafe> LogSafe for std::collections::VecDeque<T> {}
58impl<T: LogSafe> LogSafe for std::collections::LinkedList<T> {}
59impl<T: LogSafe> LogSafe for [T] {}
60impl<T: LogSafe, const N: usize> LogSafe for [T; N] {}
61impl<K: LogSafe, V: LogSafe> LogSafe for std::collections::BTreeMap<K, V> {}
62impl<K: LogSafe, V: LogSafe, S> LogSafe for std::collections::HashMap<K, V, S> {}
63impl<T: LogSafe> LogSafe for std::collections::BTreeSet<T> {}
64impl<T: LogSafe, S> LogSafe for std::collections::HashSet<T, S> {}
65impl<T: LogSafe> LogSafe for std::collections::BinaryHeap<T> {}
66
67pub mod derive {
69 pub use conjure_macros::LogSafe;
70}