alkstore 0.1.0

The alkstore contract crate: one reactive store trait surface — notify, streams, durable queues, TTL locks, outbox, scheduler — implemented by the alkstore-sqlite/-postgres/-mem engine crates; no driver dependencies
Documentation
//! Schedule read-back value (ADR-019 §3).
//!
//! `#[non_exhaustive]` per ADR-017 §3 — consumers read but never
//! construct.

use crate::opts::ScheduleOpts;

/// The `schedule()` read-back value (upsert by name).
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct Schedule {
    /// The schedule name (shared namespace — validated at the entry
    /// point with the reserved prefix rejected).
    pub name: String,
    /// The v1 spec grammar: `@every <n><unit>` only (`s|m|h|d`).
    pub spec: String,
    /// The target queue name fired jobs enqueue into.
    pub queue: String,
    /// The schedule's opts, applied over the target queue's derived
    /// engine defaults at each boundary fire (ADR-020 §3).
    pub opts: ScheduleOpts,
}

impl Schedule {
    /// Engine-construction-only constructor taking the full field set.
    ///
    /// # Contract posture
    ///
    /// Not consumer API and not part of the contract surface: engines
    /// (in-repo, lockstep-updated with core) use it to build
    /// [`Schedule`] values from row data, since `#[non_exhaustive]`
    /// (ADR-017 §3) bans struct-literal construction downstream. Not
    /// covered by ADR-017's semver-minor field-addition promise — a
    /// `Schedule` field addition changes this signature, which is an
    /// engine breaking change under a core change and a lockstep-duty
    /// event (ADR-017 §5). Hidden from consumer-facing docs.
    #[doc(hidden)]
    pub fn new(name: String, spec: String, queue: String, opts: ScheduleOpts) -> Self {
        Self {
            name,
            spec,
            queue,
            opts,
        }
    }
}