Struct ::exo::ics::IcsEvent

Overview

A IcsEvent which leads to a calendar entry.

Methods

fn new() -> IcsEvent

Creates a new IcsEvent.

Example

let event = exo::ics::IcsEvent::new();
event.summary = "This is a event";
fn try_from(value) -> Result

Tries to create a new IcsEvent from another element. Right now only record is supported.

Example

let record = exo::get_record()?;
// Need to set record start & end date - otherwise it's not working
record.set_value("calendar_start", exo::DateTime::from_local_string("2023-11-15, 12:30:00")?);
record.set_value("calendar_end", exo::DateTime::from_local_string("2023-11-15, 13:30:00")?);

// Create the event from the record
let event = exo::ics::IcsEvent::try_from(record)?;
assert_eq!(event.summary, record.get_value("name")?.get("en")?);

Protocols

protocol get uid
let output = value.uid

Allows a get operation to work.

protocol set uid
value.uid = input

Allows a set operation to work.

protocol get summary
let output = value.summary

Allows a get operation to work.

protocol set summary
value.summary = input

Allows a set operation to work.

protocol get start
let output = value.start

Allows a get operation to work.

protocol set start
value.start = input

Allows a set operation to work.

protocol get end
let output = value.end

Allows a get operation to work.

protocol set end
value.end = input

Allows a set operation to work.

protocol get timestamp
let output = value.timestamp

Allows a get operation to work.

protocol set timestamp
value.timestamp = input

Allows a set operation to work.

protocol get description
let output = value.description

Allows a get operation to work.

protocol set description
value.description = input

Allows a set operation to work.

protocol get location
let output = value.location

Allows a get operation to work.

protocol set location
value.location = input

Allows a set operation to work.

protocol get organizer
let output = value.organizer

Allows a get operation to work.

protocol set organizer
value.organizer = input

Allows a set operation to work.

protocol get status
let output = value.status

Allows a get operation to work.

protocol set status
value.status = input

Allows a set operation to work.

protocol get priority
let output = value.priority

Allows a get operation to work.

protocol set priority
value.priority = input

Allows a set operation to work.

protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.