pub trait ListFlowSpec: DataFraction {
type Id: DataFraction + Ord + Hash;
type Record: DataFraction;
type Action: DataFraction;
type Update: DataFraction;
// Required method
fn update_record(record: &mut Self::Record, update: Self::Update);
// Provided methods
fn no_record_fallback(id: &Self::Id) -> Option<Self::Record> { ... }
fn is_spent(_record: &Self::Record) -> bool { ... }
}
Expand description
Similar to meta, but every record can be changed separately.
Required Associated Types§
type Id: DataFraction + Ord + Hash
type Record: DataFraction
type Action: DataFraction
type Update: DataFraction
Required Methods§
fn update_record(record: &mut Self::Record, update: Self::Update)
Provided Methods§
fn no_record_fallback(id: &Self::Id) -> Option<Self::Record>
fn is_spent(_record: &Self::Record) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.