Skip to main content

MsgraphEvent

Struct MsgraphEvent 

Source
pub struct MsgraphEvent {
Show 33 fields pub id: String, pub ical_uid: Option<String>, pub change_key: Option<String>, pub created_date_time: Option<String>, pub last_modified_date_time: Option<String>, pub event_type: Option<MsgraphEventType>, pub series_master_id: Option<String>, pub original_start: Option<String>, pub original_start_time_zone: Option<String>, pub original_end_time_zone: Option<String>, pub subject: MsgraphField<String>, pub body: MsgraphField<MsgraphItemBody>, pub start: MsgraphField<MsgraphDateTimeTimeZone>, pub end: MsgraphField<MsgraphDateTimeTimeZone>, pub is_all_day: MsgraphField<bool>, pub location: MsgraphField<MsgraphLocation>, pub recurrence: MsgraphField<MsgraphPatternedRecurrence>, pub attendees: MsgraphField<Vec<MsgraphAttendee>>, pub organizer: MsgraphField<MsgraphRecipient>, pub categories: MsgraphField<Vec<String>>, pub show_as: MsgraphField<MsgraphFreeBusyStatus>, pub sensitivity: MsgraphField<MsgraphSensitivity>, pub importance: MsgraphField<MsgraphImportance>, pub is_reminder_on: MsgraphField<bool>, pub reminder_minutes_before_start: MsgraphField<u32>, pub is_cancelled: Option<bool>, pub is_organizer: Option<bool>, pub response_status: Option<MsgraphResponseStatus>, pub web_link: Option<String>, pub is_online_meeting: MsgraphField<bool>, pub online_meeting: Option<MsgraphOnlineMeetingInfo>, pub cancelled_occurrences: Vec<String>, pub single_value_extended_properties: MsgraphField<Vec<MsgraphSingleValueExtendedProperty>>,
}
Expand description

An event of a calendar. Doubles as the create/update body.

Unset fields are left out (an update preserves them), null fields are serialized as explicit nulls (an update clears them), and a set empty collection clears the collection.

Fields§

§id: String

The unique identifier of the event.

§ical_uid: Option<String>

The iCalendar UID shared by every event of a series across calendars, read-only.

§change_key: Option<String>

The version of the event, changing with every edit, read-only.

§created_date_time: Option<String>

When the event was created, read-only.

§last_modified_date_time: Option<String>

When the event was last modified, read-only.

§event_type: Option<MsgraphEventType>

The kind of event: lone, series master, occurrence or exception, read-only.

§series_master_id: Option<String>

The series master of an occurrence or exception, read-only.

§original_start: Option<String>

The start the occurrence had in its series, for an occurrence or an exception, read-only.

§original_start_time_zone: Option<String>

The zone the event’s start was created in, read-only.

§original_end_time_zone: Option<String>

The zone the event’s end was created in, read-only.

§subject: MsgraphField<String>

The subject.

§body: MsgraphField<MsgraphItemBody>

The body.

§start: MsgraphField<MsgraphDateTimeTimeZone>

The start, a wall time in a zone.

§end: MsgraphField<MsgraphDateTimeTimeZone>

The end, a wall time in a zone.

§is_all_day: MsgraphField<bool>

Whether the event lasts whole days, its start and end then being midnights.

§location: MsgraphField<MsgraphLocation>

The location.

§recurrence: MsgraphField<MsgraphPatternedRecurrence>

The recurrence of a series master.

§attendees: MsgraphField<Vec<MsgraphAttendee>>

The attendees.

§organizer: MsgraphField<MsgraphRecipient>

The organizer, read-only once the event exists.

§categories: MsgraphField<Vec<String>>

The categories.

§show_as: MsgraphField<MsgraphFreeBusyStatus>

How the event shows in the user’s free/busy time.

§sensitivity: MsgraphField<MsgraphSensitivity>

The sensitivity.

§importance: MsgraphField<MsgraphImportance>

The importance.

§is_reminder_on: MsgraphField<bool>

Whether a reminder is set.

§reminder_minutes_before_start: MsgraphField<u32>

How long before the start the reminder fires, in minutes.

§is_cancelled: Option<bool>

Whether the event was cancelled, read-only.

§is_organizer: Option<bool>

Whether the user organizes the event, read-only.

§response_status: Option<MsgraphResponseStatus>

The user’s own response, read-only.

§web_link: Option<String>

The Outlook web link, read-only.

§is_online_meeting: MsgraphField<bool>

Whether the event is an online meeting. Setting it makes Graph create one with the calendar’s default provider (Teams), whose details then come back in onlineMeeting.

§online_meeting: Option<MsgraphOnlineMeetingInfo>

The details to join an online meeting (Teams), read-only.

§cancelled_occurrences: Vec<String>

The occurrence ids (OID.{seriesMasterId}.{date}) of a series’ cancelled occurrences, on a series master, read-only.

§single_value_extended_properties: MsgraphField<Vec<MsgraphSingleValueExtendedProperty>>

Single-value extended properties, returned only when expanded.

Implementations§

Source§

impl MsgraphEvent

Source

pub fn to_ical(&self) -> String

Available on crate feature ical only.

Projects a lone event or a series master onto a fresh VCALENDAR document.

Source

pub fn to_ical_series(&self, exceptions: &[&MsgraphEvent]) -> String

Available on crate feature ical only.

Projects a series master and its exceptions onto one VCALENDAR document, the exceptions as VEVENTs carrying the master’s UID and a RECURRENCE-ID.

Read the exceptions with MSGRAPH_EVENT_ICAL_SELECT too: the default instance listing leaves out originalStart, without which an exception gets no RECURRENCE-ID and reads as a second master.

Source

pub fn from_ical(contents: &[u8]) -> Result<Self, MsgraphEventIcalError>

Available on crate feature ical only.

Projects an iCalendar document onto an event, in full state: each managed field is Set from the series master or Null when absent, while Graph-only fields stay Unset.

The exceptions of a series are not read: Graph takes each through its instance (Self::instance_update_from_ical).

Source

pub fn create_from_ical(contents: &[u8]) -> Result<Self, MsgraphEventIcalError>

Available on crate feature ical only.

Projects an iCalendar document onto a create body: the full-state projection minus its nulls and empty collections, which a fresh event does not need.

Source

pub fn update_from_ical( contents: &[u8], base: &[u8], ) -> Result<Self, MsgraphEventIcalError>

Available on crate feature ical only.

Projects an iCalendar document onto an update body: the fields that differ from the base document (the state last synced), the unchanged ones left Unset and out of the PATCH.

Source

pub fn instance_update_from_ical( contents: &[u8], base: &[u8], ) -> Result<Option<Self>, MsgraphEventIcalError>

Available on crate feature ical only.

Projects one occurrence of a series onto the update body of its Graph instance: the fields it sets differently from base, the occurrence as Graph holds it; None when the two agree.

Each document holds that occurrence alone, as its first VEVENT: an override with its RECURRENCE-ID, or the series’ own component carried to the occurrence, which is what reverts an exception. Neither the recurrence nor the stash is sent, Graph keeping both on the series master.

Source

pub fn recurrence_id_of(&self, original_start: &str) -> Option<String>

Available on crate feature ical only.

The RECURRENCE-ID value the projection gives the occurrence of this series master that originally started at original_start (an instance’s originalStart): a date for an all-day series, the wall time in the series’ zone, or a UTC stamp when that zone is unknown.

A consumer told an occurrence by its RECURRENCE-ID finds the Graph instance with it, comparing values the way the projection wrote them.

Source

pub fn stashed_uid(&self) -> Option<String>

Available on crate feature ical only.

The iCalendar UID the stash carries, None for an event no document was ever written to, Graph minting its own iCalUId.

A sync engine checks it after a write: a server that dropped the stash would hand the event back under Graph’s UID rather than the one it was written with.

Trait Implementations§

Source§

impl Clone for MsgraphEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MsgraphEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MsgraphEvent

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for MsgraphEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for MsgraphEvent

Source§

impl PartialEq for MsgraphEvent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for MsgraphEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MsgraphEvent

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.