cartulary 0.3.0-alpha.1

The knowledge layer of your project — decisions, issues, docs, all in one place.
Documentation
pub mod alert;
pub mod body;
pub mod check;
pub mod decision_record;
pub mod description;
pub mod entity_ref;
pub mod entry_locator;
pub mod entry_origin;
pub mod event;
pub mod issue;
pub mod load_defect;
pub mod malformed_entry;
pub mod page;
pub mod query;
pub mod record_kind;
pub mod record_ref;
pub mod relates;
pub mod search;
pub mod site;
pub mod status;
pub mod tag;
pub mod tag_descriptor;
pub mod tag_filter;
pub mod tag_list;
pub mod tag_validation;
pub mod temporal;
pub mod title;
pub mod ulid;

/// Return `true` iff `s` matches `[a-z0-9][a-z0-9-]*`: non-empty, starts with
/// a lowercase ASCII letter or digit, and contains only `[a-z0-9-]`.
///
/// Shared by [`record_kind`] and [`status`].
pub(super) fn is_valid_kebab_lowercase(s: &str) -> bool {
    let mut chars = s.chars();
    match chars.next() {
        None => false,
        Some(first) => {
            (first.is_ascii_lowercase() || first.is_ascii_digit())
                && chars.all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-')
        }
    }
}