/rust/registry/src/index.crates.io-1949cf8c6b5b557f/opaque-debug-0.3.0/src/lib.rs
Line | Count | Source |
1 | | //! Macro for opaque `Debug` trait implementation. |
2 | | #![no_std] |
3 | | |
4 | | #[doc(hidden)] |
5 | | pub extern crate core as __core; |
6 | | |
7 | | /// Macro for defining opaque `Debug` implementation. |
8 | | /// |
9 | | /// It will use the following format: "StructName { ... }". While it's |
10 | | /// convinient to have it (e.g. for including into other structs), it could be |
11 | | /// undesirable to leak internal state, which can happen for example through |
12 | | /// uncareful logging. |
13 | | #[macro_export] |
14 | | macro_rules! implement { |
15 | | ($struct:ty) => { |
16 | | impl $crate::__core::fmt::Debug for $struct { |
17 | 0 | fn fmt(&self, f: &mut $crate::__core::fmt::Formatter) |
18 | 0 | -> Result<(), $crate::__core::fmt::Error> |
19 | | { |
20 | 0 | write!(f, concat!(stringify!($struct), " {{ ... }}")) |
21 | 0 | } Unexecuted instantiation: <polyval::backend::autodetect::Polyval as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::autodetect::Aes128 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::soft::Aes128 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::ni::aes128::Aes128 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::ni::aes192::Aes192 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::ni::aes256::Aes256 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::autodetect::Aes192 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::soft::Aes192 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::autodetect::Aes256 as core::fmt::Debug>::fmt Unexecuted instantiation: <aes::soft::Aes256 as core::fmt::Debug>::fmt |
22 | | } |
23 | | } |
24 | | } |