Enum icalendar::Trigger

source ·
pub enum Trigger {
    Duration(DurationOption<Related>),
    DateTime(CalendarDateTime),
}
Expand description

Describes when an alarm is supposed to occure.

RFC 5545, Section 3.8.6.3, see also Alarm Trigger Relationship This property specifies when an alarm will trigger.

Variants§

§

Duration(DurationOption<Related>)

Duration in relation to either Start or End of the event

§

DateTime(CalendarDateTime)

Absolute DateTime of the Trigger

Implementations§

assert_eq!(
    Trigger::after_start(Duration::hours(1)),
    Trigger::Duration(Duration::hours(1), Some(Related::Start))
)

please don’t supply negative durations, you’ll just confuse everybody

assert_eq!(
    Trigger::after_end(Duration::hours(1)),
    Trigger::Duration(Duration::hours(1), Some(Related::End))
)

please don’t supply negative durations, you’ll just confuse everybody

assert_eq!(
    Trigger::before_start(Duration::hours(1)),
    Trigger::Duration(-Duration::hours(1), Some(Related::Start))
)

please don’t supply negative durations, you’ll just confuse everybody

assert_eq!(
    Trigger::before_end(Duration::hours(1)),
    Trigger::Duration(-Duration::hours(1), Some(Related::End))
)

please don’t supply negative durations, you’ll just confuse everybody

Returns the containing Related if the Trigger contains one

Returns the containing Duration if the Trigger contains one

Returns the containing CalendarDateTime if the Trigger contains one

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.