Skip to main content

Event

Trait Event 

Source
pub trait Event {
    // Required methods
    fn uid(&self) -> Cow<'_, str>;
    fn description(&self) -> Option<Cow<'_, str>>;
    fn start(&self) -> Option<LooseDateTime>;
    fn end(&self) -> Option<LooseDateTime>;
    fn status(&self) -> Option<EventStatus>;
    fn summary(&self) -> Cow<'_, str>;

    // Provided method
    fn short_id(&self) -> Option<NonZeroU32> { ... }
}
Expand description

Trait representing a calendar event.

Required Methods§

Source

fn uid(&self) -> Cow<'_, str>

The unique identifier for the event.

Source

fn description(&self) -> Option<Cow<'_, str>>

The description of the event, if available.

Source

fn start(&self) -> Option<LooseDateTime>

The location of the event, if available.

Source

fn end(&self) -> Option<LooseDateTime>

The start date and time of the event, if available.

Source

fn status(&self) -> Option<EventStatus>

The status of the event, if available.

Source

fn summary(&self) -> Cow<'_, str>

The summary of the event.

Provided Methods§

Source

fn short_id(&self) -> Option<NonZeroU32>

The short identifier for the event. It will be None if the event does not have a short ID. It is used for display purposes and may not be unique.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Event for VEvent<String>

Source§

fn uid(&self) -> Cow<'_, str>

Source§

fn description(&self) -> Option<Cow<'_, str>>

Source§

fn start(&self) -> Option<LooseDateTime>

Source§

fn end(&self) -> Option<LooseDateTime>

Source§

fn status(&self) -> Option<EventStatus>

Source§

fn summary(&self) -> Cow<'_, str>

Implementors§