@@ -164,6 +164,7 @@ impl<KEY: Key, T: PrivateKeyCacheImpl<KEY>> PrivateKeyCacheImpl<KEY> for &mut T
164
164
}
165
165
166
166
#[ derive( Debug ) ]
167
+ #[ cfg_attr( feature = "defmt-03" , derive( defmt:: Format ) ) ]
167
168
pub ( crate ) struct DirtTracker {
168
169
/// Managed from the library code.
169
170
///
@@ -198,6 +199,7 @@ impl DirtTracker {
198
199
/// This type of cache doesn't have to be kept around and may be constructed on every api call.
199
200
/// You could simply pass `&mut NoCache::new()` every time.
200
201
#[ derive( Debug ) ]
202
+ #[ cfg_attr( feature = "defmt-03" , derive( defmt:: Format ) ) ]
201
203
pub struct NoCache {
202
204
page_states : UncachedPageStates ,
203
205
page_pointers : UncachedPagePointers ,
@@ -266,6 +268,7 @@ impl<KEY: Key> PrivateKeyCacheImpl<KEY> for NoCache {
266
268
///
267
269
/// Make sure the page count is correct. If the number is lower than the actual amount, the code will panic at some point.
268
270
#[ derive( Debug ) ]
271
+ #[ cfg_attr( feature = "defmt-03" , derive( defmt:: Format ) ) ]
269
272
pub struct PageStateCache < const PAGE_COUNT : usize > {
270
273
dirt_tracker : DirtTracker ,
271
274
page_states : CachedPageStates < PAGE_COUNT > ,
@@ -339,6 +342,7 @@ impl<KEY: Key, const PAGE_COUNT: usize> PrivateKeyCacheImpl<KEY> for PageStateCa
339
342
///
340
343
/// Make sure the page count is correct. If the number is lower than the actual amount, the code will panic at some point.
341
344
#[ derive( Debug ) ]
345
+ #[ cfg_attr( feature = "defmt-03" , derive( defmt:: Format ) ) ]
342
346
pub struct PagePointerCache < const PAGE_COUNT : usize > {
343
347
dirt_tracker : DirtTracker ,
344
348
page_states : CachedPageStates < PAGE_COUNT > ,
@@ -417,6 +421,7 @@ impl<KEY: Key, const PAGE_COUNT: usize> PrivateKeyCacheImpl<KEY> for PagePointer
417
421
/// the chance of a cache hit.
418
422
/// The keys are cached in a fifo and any time its location is updated in cache it's added to the front.
419
423
#[ derive( Debug ) ]
424
+ #[ cfg_attr( feature = "defmt-03" , derive( defmt:: Format ) ) ]
420
425
pub struct KeyPointerCache < const PAGE_COUNT : usize , KEY : Key , const KEYS : usize > {
421
426
dirt_tracker : DirtTracker ,
422
427
page_states : CachedPageStates < PAGE_COUNT > ,
0 commit comments