pub struct SketchIndex {
pub schema_version: String,
pub last_updated: Option<DateTime<Utc>>,
pub sketches: Vec<SketchIndexEntry>,
pub next_number: u64,
pub use_timestamp_numbering: bool,
}Expand description
Sketch index (sketches.yaml)
Fields§
§schema_version: StringSchema version
last_updated: Option<DateTime<Utc>>Last update timestamp
sketches: Vec<SketchIndexEntry>List of sketches
next_number: u64Next available sketch number (for sequential numbering)
use_timestamp_numbering: boolWhether to use timestamp-based numbering (YYMMDDHHmm format)
Implementations§
Source§impl SketchIndex
impl SketchIndex
Sourcepub fn new_with_timestamp_numbering() -> Self
pub fn new_with_timestamp_numbering() -> Self
Create a new sketch index with timestamp-based numbering
Sourcepub fn add_sketch(&mut self, sketch: &Sketch, filename: String)
pub fn add_sketch(&mut self, sketch: &Sketch, filename: String)
Add a sketch to the index
Sourcepub fn get_next_number(&self) -> u64
pub fn get_next_number(&self) -> u64
Get the next available sketch 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<&SketchIndexEntry>
pub fn find_by_number(&self, number: u64) -> Option<&SketchIndexEntry>
Find a sketch by number
Trait Implementations§
Source§impl Clone for SketchIndex
impl Clone for SketchIndex
Source§fn clone(&self) -> SketchIndex
fn clone(&self) -> SketchIndex
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 SketchIndex
impl Debug for SketchIndex
Source§impl Default for SketchIndex
impl Default for SketchIndex
Source§impl<'de> Deserialize<'de> for SketchIndex
impl<'de> Deserialize<'de> for SketchIndex
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 SketchIndex
impl PartialEq for SketchIndex
Source§impl Serialize for SketchIndex
impl Serialize for SketchIndex
impl StructuralPartialEq for SketchIndex
Auto Trait Implementations§
impl Freeze for SketchIndex
impl RefUnwindSafe for SketchIndex
impl Send for SketchIndex
impl Sync for SketchIndex
impl Unpin for SketchIndex
impl UnwindSafe for SketchIndex
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