Skip to main content

RemindersManager

Struct RemindersManager 

Source
pub struct RemindersManager { /* private fields */ }
Expand description

The main reminders manager providing access to EventKit functionality

Implementations§

Source§

impl RemindersManager

Source

pub fn new() -> Self

Creates a new RemindersManager instance

Source

pub fn authorization_status() -> AuthorizationStatus

Gets the current authorization status for reminders

Source

pub fn request_access(&self) -> Result<bool>

Requests full access to reminders (blocking)

Returns Ok(true) if access was granted, Ok(false) if denied

Source

pub fn ensure_authorized(&self) -> Result<()>

Ensures we have authorization, requesting if needed

Source

pub fn list_calendars(&self) -> Result<Vec<CalendarInfo>>

Lists all reminder calendars (lists)

Source

pub fn list_sources(&self) -> Result<Vec<SourceInfo>>

Lists all available sources (iCloud, Local, Exchange, etc.)

Source

pub fn default_calendar(&self) -> Result<CalendarInfo>

Gets the default calendar for new reminders

Source

pub fn fetch_all_reminders(&self) -> Result<Vec<ReminderItem>>

Fetches all reminders (blocking)

Source

pub fn fetch_reminders( &self, calendar_titles: Option<&[&str]>, ) -> Result<Vec<ReminderItem>>

Fetches reminders from specific calendars (blocking)

Source

pub fn fetch_incomplete_reminders(&self) -> Result<Vec<ReminderItem>>

Fetches incomplete reminders

Source

pub fn create_reminder( &self, title: &str, notes: Option<&str>, calendar_title: Option<&str>, priority: Option<usize>, due_date: Option<DateTime<Local>>, start_date: Option<DateTime<Local>>, ) -> Result<ReminderItem>

Creates a new reminder

§Arguments
  • title - The reminder title
  • notes - Optional notes/description
  • calendar_title - Optional calendar/list name (uses default if None)
  • priority - Optional priority (0 = none, 1-4 = high, 5 = medium, 6-9 = low)
  • due_date - Optional due date for the reminder
  • start_date - Optional start date (when to start working on it)
Source

pub fn update_reminder( &self, identifier: &str, title: Option<&str>, notes: Option<&str>, completed: Option<bool>, priority: Option<usize>, due_date: Option<Option<DateTime<Local>>>, start_date: Option<Option<DateTime<Local>>>, calendar_title: Option<&str>, ) -> Result<ReminderItem>

Updates an existing reminder

All fields are optional - only provided fields will be updated. Pass Some(None) for due_date/start_date to clear them. Use calendar_title to move the reminder to a different list.

Source

pub fn complete_reminder(&self, identifier: &str) -> Result<ReminderItem>

Marks a reminder as complete

Source

pub fn uncomplete_reminder(&self, identifier: &str) -> Result<ReminderItem>

Marks a reminder as incomplete

Source

pub fn delete_reminder(&self, identifier: &str) -> Result<()>

Deletes a reminder

Source

pub fn get_reminder(&self, identifier: &str) -> Result<ReminderItem>

Gets a reminder by its identifier

Source

pub fn get_alarms(&self, identifier: &str) -> Result<Vec<AlarmInfo>>

Lists all alarms on a reminder.

Source

pub fn add_alarm(&self, identifier: &str, alarm: &AlarmInfo) -> Result<()>

Adds an alarm to a reminder.

Source

pub fn remove_all_alarms(&self, identifier: &str) -> Result<()>

Removes all alarms from a reminder.

Source

pub fn remove_alarm(&self, identifier: &str, index: usize) -> Result<()>

Removes a specific alarm from a reminder by index.

Source

pub fn set_url(&self, identifier: &str, url: Option<&str>) -> Result<()>

Set or clear the URL on a reminder.

Source

pub fn get_recurrence_rules( &self, identifier: &str, ) -> Result<Vec<RecurrenceRule>>

Gets recurrence rules on a reminder.

Source

pub fn set_recurrence_rule( &self, identifier: &str, rule: &RecurrenceRule, ) -> Result<()>

Sets a recurrence rule on a reminder (replaces any existing rules).

Source

pub fn remove_recurrence_rules(&self, identifier: &str) -> Result<()>

Removes all recurrence rules from a reminder.

Source

pub fn create_calendar(&self, title: &str) -> Result<CalendarInfo>

Creates a new reminder list (calendar)

The list will be created in the default source (usually iCloud or Local).

Source

pub fn rename_calendar( &self, identifier: &str, new_title: &str, ) -> Result<CalendarInfo>

Renames an existing reminder list (calendar) Rename a reminder list (backward compat wrapper).

Source

pub fn update_calendar( &self, identifier: &str, new_title: Option<&str>, color_rgba: Option<(f64, f64, f64, f64)>, ) -> Result<CalendarInfo>

Update a reminder list — name, color, or both.

Source

pub fn delete_calendar(&self, identifier: &str) -> Result<()>

Deletes a reminder list (calendar)

Warning: This will delete all reminders in the list!

Source

pub fn get_calendar(&self, identifier: &str) -> Result<CalendarInfo>

Gets a calendar by its identifier

Trait Implementations§

Source§

impl Default for RemindersManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,