calternal_notes_core::identity
Stable Note identity and cross-platform filename shaping.
Source: crates/calternal-notes-core/src/identity.rs
Functions
Section titled “Functions”id_slice
Section titled “id_slice”pub fn id_slice(id: &str) -> StringReturn the first eight ASCII hex digits in an identity, in lowercase.
Source: crates/calternal-notes-core/src/identity.rs:36
mint_calternal_id
Section titled “mint_calternal_id”pub fn mint_calternal_id(mut fill_random: impl FnMut(&mut [u8])) -> StringMint a v4 calternal-id from caller-supplied random bytes.
The caller owns the random source. This keeps identity minting deterministic in tests and prevents the pure crate from reading OS state.
Source: crates/calternal-notes-core/src/identity.rs:9
note_filename
Section titled “note_filename”pub fn note_filename(date: &str, title: &str, id: &str) -> StringBuild the canonical Notes filename. The date is compacted by removing hyphens, and the Note identity remains stable when the slug changes.
Source: crates/calternal-notes-core/src/identity.rs:46
slugify
Section titled “slugify”pub fn slugify(title: &str) -> StringMatch calternal.js slugify: NFD, ASCII lowercase alphanumerics, collapsed
ASCII separators, silent drop of non-ASCII leftovers, and a 64-byte cap.
Source: crates/calternal-notes-core/src/identity.rs:67
task_filename
Section titled “task_filename”pub fn task_filename(date: &str, title: &str, id: &str) -> StringBuild the canonical task filename in Notes using the same date, slug, and identity slice as any other Note. Frontmatter carries the Task meaning.