use std::fmt::Debug;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Default)]
pub enum Hint {
#[default]
Normal,
Low,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Location {
#[default]
Default,
InMem,
OnDisk,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Age {
#[default]
Fresh,
Young,
Old,
}
pub trait Properties: Send + Sync + 'static + Clone + Default + Debug {
fn with_phantom(self, phantom: bool) -> Self;
fn phantom(&self) -> Option<bool>;
fn with_hint(self, hint: Hint) -> Self;
fn hint(&self) -> Option<Hint>;
fn with_location(self, location: Location) -> Self;
fn location(&self) -> Option<Location>;
fn with_age(self, age: Age) -> Self;
fn age(&self) -> Option<Age>;
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Source {
Outer,
Memory,
Disk,
}