@@ -14,6 +14,7 @@ pub mod consolidation;
1414pub mod cursor;
1515pub mod layers;
1616pub mod ord;
17+ #[ cfg( feature = "persistence" ) ]
1718pub mod persistent;
1819// We export the `spine_fueled` module only for testing (so we can explicitly
1920// choose the in-memory DS). For regular logic, since we replace it with the
@@ -30,6 +31,7 @@ use crate::{
3031 time:: { AntichainRef , Timestamp } ,
3132 NumEntries ,
3233} ;
34+ #[ cfg( feature = "persistence" ) ]
3335use bincode:: { Decode , Encode } ;
3436pub use cursor:: { Consumer , Cursor , ValueConsumer } ;
3537#[ cfg( feature = "persistence" ) ]
@@ -46,15 +48,30 @@ use std::{fmt::Debug, hash::Hash};
4648/// must be generic over any relational data, it is sufficient to impose
4749/// `DBData` as a trait bound on types. Conversely, a trait bound of the form
4850/// `B: BatchReader` implies `B::Key: DBData` and `B::Val: DBData`.
51+ #[ cfg( feature = "persistence" ) ]
4952pub trait DBData :
5053 Clone + Eq + Ord + Hash + SizeOf + Send + Debug + Decode + Encode + ' static
5154{
5255}
56+
57+ #[ cfg( not( feature = "persistence" ) ) ]
58+ pub trait DBData :
59+ Clone + Eq + Ord + Hash + SizeOf + Send + Debug + ' static
60+ {
61+ }
62+
63+ #[ cfg( feature = "persistence" ) ]
5364impl < T > DBData for T where
5465 T : Clone + Eq + Ord + Hash + SizeOf + Send + Debug + Decode + Encode + ' static
5566{
5667}
5768
69+ #[ cfg( not( feature = "persistence" ) ) ]
70+ impl < T > DBData for T where
71+ T : Clone + Eq + Ord + Hash + SizeOf + Send + Debug + ' static
72+ {
73+ }
74+
5875/// Trait for data types used as weights.
5976///
6077/// A type used for weights in a batch (i.e., as `BatchReader::R`) must behave
0 commit comments