1use std::{
5 fmt,
6 ops::{Deref, DerefMut},
7};
8
9#[derive(Copy, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)]
13pub struct DebugIgnore<T>(pub T);
14
15impl<T> Deref for DebugIgnore<T> {
16 type Target = T;
17
18 fn deref(&self) -> &Self::Target {
19 &self.0
20 }
21}
22
23impl<T> DerefMut for DebugIgnore<T> {
24 fn deref_mut(&mut self) -> &mut Self::Target {
25 &mut self.0
26 }
27}
28
29impl<T> fmt::Debug for DebugIgnore<T> {
30 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
31 write!(f, "...")
32 }
33}