calternal_dav::reminders
iCalendar VTODO resources for Markdown Tasks.
Markdown remains authoritative. This module only converts the existing task projection to and from the small VTODO property set that the Notes writer can store without losing data. Preserved Apple wire values cannot override later Markdown dates or priority (#643; DESIGN §31). Scheduled-only Tasks expose Apple’s visible DUE while retaining their scheduled role (#647).
Source: crates/calternal-dav/src/reminders.rs
Structs
Section titled “Structs”ReminderTask
Section titled “ReminderTask”pub struct ReminderTaskA Task row ready for CalDAV. The Index supplies the projected fields. The Notes ETags cover the complete Markdown fingerprint and VTODO bytes. An edit to prose or a sibling checkbox also invalidates stale writes (#643).
Fields
pub uid: String: Stable CalDAV resource UID. Notes maps this UID to the current Task row, so changing a Task’scalternal-idor moving its Markdown file does not change the resource identity that Reminders clients sync.pub task: TaskIndexEntrypub related_to: Option<String>pub url: Stringpub etag: Stringpub completed: Option<String>pub dav_metadata: TaskDavMetadata
Implements: Clone, Debug, PartialEq, Eq
ReminderTask::icalendar
Section titled “ReminderTask::icalendar”pub fn icalendar(&self) -> StringProject authoritative Task fields; retain Apple precision only while it agrees with Markdown, so stale metadata cannot undo an edit (#643).
Source: crates/calternal-dav/src/reminders.rs:145
ReminderTaskEdit
Section titled “ReminderTaskEdit”pub struct ReminderTaskEditSupported changes from a single incoming VTODO.
Fields
pub uid: Stringpub title: Stringpub status: TaskStatuspub completed: Option<String>pub due: Option<TaskDate>pub dtstart: Option<TaskDate>pub start: Option<TaskDate>pub dtstart_role_start: boolpub due_role_scheduled: bool: The parser already moved a projected scheduled DUE intodtstart. Keep this provenance so the provider can distinguish that normal form from a marker-free Apple date removal (#647).pub priority: Option<TaskPriority>pub recurrence: Option<String>: Canonical recurrence text, stored in Task frontmatter. No occurrence is generated by the VTODO projection.pub related_to: Option<String>pub url: Option<String>pub alarms: Vec<String>: Raw, folded VALARM components. The Notes provider stores these with their Task UID because a rich Task file can project several VTODOs.pub calendar_properties: Vec<String>: Original properties outside the Task fields. They stay folded and escaped as sent, then return on GET from the per-UID DAV metadata map.pub timezones: Vec<String>pub properties: Vec<String>pub completed_at: Option<String>: A completion timestamp is separate from Task’s day-only completed field.pub description: Option<String>pub description_params: Option<String>
Implements: Clone, Debug, PartialEq, Eq
Source: crates/calternal-dav/src/reminders.rs:312
TaskDate
Section titled “TaskDate”pub struct TaskDateOne civil date or wall-clock time. A named zone is DAV metadata; Task Markdown stores the local date and time as civil values.
Fields
pub date: CivilDatepub time: Option<String>pub timezone: Option<String>
Implements: Clone, Debug, PartialEq, Eq, Deserialize, Serialize
TaskDate::frontmatter_value
Section titled “TaskDate::frontmatter_value”pub fn frontmatter_value(&self) -> StringNo doc comment.
Source: crates/calternal-dav/src/reminders.rs:348
TaskDavMetadata
Section titled “TaskDavMetadata”pub struct TaskDavMetadataDAV-only state stored in Task frontmatter and copied into the rebuildable Index payload. It is keyed by a Task resource UID because one Task file can project a parent VTODO and several child VTODOs.
Fields
pub resource_uid: Option<String>pub related_to: Option<String>pub due_tzid: Option<String>pub scheduled_tzid: Option<String>pub start_tzid: Option<String>pub due_value: Option<TaskDate>: Preserve the complete incoming values for resources whose Markdown checkbox representation has date-only fields (for example subtasks). The date part still updates the shared Task index; these values retain time precision and TZID for CalDAV round trips only while the current Markdown fields agree. Later Markdown edits always win (#643).pub scheduled_value: Option<TaskDate>pub start_value: Option<TaskDate>pub alarms: Vec<String>pub calendar_properties: Vec<String>: Properties that have no Markdown Task field stay with this DAV resource. Keeping their original folded content lines lets Apple extensions and future iCalendar properties survive a read and write cycle.pub timezones: Vec<String>pub properties: Vec<String>pub completed_at: Option<String>pub url: Option<String>pub description_params: Option<String>pub description: Option<String>: The Task body is the source of truth. This copy is added to the rebuildable Index projection so a DAV GET does not need a filesystem read after the task row has been decoded.
Implements: Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize
TaskDavMetadata::clear_absolute_alarms
Section titled “TaskDavMetadata::clear_absolute_alarms”pub fn clear_absolute_alarms(&mut self)Absolute TRIGGERs refer to an old instant after a civil-date or zone edit. Relative alarms can follow the new Task dates safely (#643).
Source: crates/calternal-dav/src/reminders.rs:34
Type aliases
Section titled “Type aliases”TaskDavMetadataByUid
Section titled “TaskDavMetadataByUid”pub type TaskDavMetadataByUid = BTreeMap<String, TaskDavMetadata>;No doc comment.
Source: crates/calternal-dav/src/reminders.rs:139
Functions
Section titled “Functions”parse_reminder_icalendar
Section titled “parse_reminder_icalendar”pub fn parse_reminder_icalendar(body: &str) -> Result<ReminderTaskEdit, &'static str>Parse one VTODO. Task fields map to Markdown; other valid content lines stay in per-resource metadata so clients can write properties we do not use. Scheduled-only DUE values return to the scheduled role, not a deadline (#647; DESIGN §31). A role marker also makes date removal lossless.
Source: crates/calternal-dav/src/reminders.rs:367
recurrence_to_rrule
Section titled “recurrence_to_rrule”pub fn recurrence_to_rrule(value: &str) -> Option<String>Return a safe RRULE only when the Task recurrence can be represented by the bounded VTODO recurrence subset.
Source: crates/calternal-dav/src/reminders.rs:1206
Constants
Section titled “Constants”TASK_DAV_METADATA_KEY
Section titled “TASK_DAV_METADATA_KEY”pub const TASK_DAV_METADATA_KEY: &strNo doc comment.