pub struct DecisionIndex {
pub schema_version: String,
pub last_updated: Option<DateTime<Utc>>,
pub decisions: Vec<DecisionIndexEntry>,
pub next_number: u64,
pub use_timestamp_numbering: bool,
}Expand description
Decision log index (decisions.yaml)
Fields§
§schema_version: StringSchema version
last_updated: Option<DateTime<Utc>>Last update timestamp
decisions: Vec<DecisionIndexEntry>List of decisions
next_number: u64Next available decision number (for sequential numbering)
use_timestamp_numbering: boolWhether to use timestamp-based numbering (YYMMDDHHmm format)
Implementations§
Source§impl DecisionIndex
impl DecisionIndex
Sourcepub fn new_with_timestamp_numbering() -> Self
pub fn new_with_timestamp_numbering() -> Self
Create a new decision index with timestamp-based numbering
Sourcepub fn add_decision(&mut self, decision: &Decision, filename: String)
pub fn add_decision(&mut self, decision: &Decision, filename: String)
Add a decision to the index
Sourcepub fn get_next_number(&self) -> u64
pub fn get_next_number(&self) -> u64
Get the next available decision number For timestamp-based numbering, generates a new timestamp For sequential numbering, returns the next sequential number
Sourcepub fn find_by_number(&self, number: u64) -> Option<&DecisionIndexEntry>
pub fn find_by_number(&self, number: u64) -> Option<&DecisionIndexEntry>
Find a decision by number
Trait Implementations§
Source§impl Clone for DecisionIndex
impl Clone for DecisionIndex
Source§fn clone(&self) -> DecisionIndex
fn clone(&self) -> DecisionIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecisionIndex
impl Debug for DecisionIndex
Source§impl Default for DecisionIndex
impl Default for DecisionIndex
Source§impl<'de> Deserialize<'de> for DecisionIndex
impl<'de> Deserialize<'de> for DecisionIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DecisionIndex
impl PartialEq for DecisionIndex
Source§impl Serialize for DecisionIndex
impl Serialize for DecisionIndex
impl StructuralPartialEq for DecisionIndex
Auto Trait Implementations§
impl Freeze for DecisionIndex
impl RefUnwindSafe for DecisionIndex
impl Send for DecisionIndex
impl Sync for DecisionIndex
impl Unpin for DecisionIndex
impl UnwindSafe for DecisionIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more