Struct icalendar::Event

source ·
pub struct Event { /* private fields */ }
Expand description

Implementations§

source§

impl Event

source

pub fn new() -> Self

Creates a new Event.

source

pub fn done(&mut self) -> Self

End of builder pattern. copies over everything

source

pub fn status(&mut self, status: EventStatus) -> &mut Self

Defines the overall status or confirmation

source

pub fn get_status(&self) -> Option<EventStatus>

Gets the overall status or confirmation.

Trait Implementations§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Component for Event

source§

fn component_kind(&self) -> String

Tells you what kind of Component this is

Might be VEVENT, VTODO, VALARM etc

source§

fn properties(&self) -> &BTreeMap<String, Property>

Read-only access to properties

source§

fn components(&self) -> &[Other]

Read-only access to properties

source§

fn multi_properties(&self) -> &BTreeMap<String, Vec<Property>>

Read-only access to multi_properties

source§

fn append_property(&mut self, property: impl Into<Property>) -> &mut Self

Adds a Property

source§

fn append_multi_property(&mut self, property: impl Into<Property>) -> &mut Self

Adds a Property of which there may be many

source§

fn append_component(&mut self, child: impl Into<Other>) -> &mut Self

Append a given Component
source§

fn property_value(&self, key: &str) -> Option<&str>

Gets the value of a property.
source§

fn fmt_write<W: Write>(&self, out: &mut W) -> Result<(), Error>

Writes Component using std::fmt.
source§

fn to_string(&self) -> String

Serializes this component into rfc5545 again Read more
source§

fn try_into_string(&self) -> Result<String, Error>

Serializes this component into rfc5545 again
source§

fn add_property( &mut self, key: impl Into<String>, val: impl Into<String>, ) -> &mut Self

Construct and append a Property
source§

fn add_property_pre_alloc(&mut self, key: String, val: String) -> &mut Self

👎Deprecated
Construct and append a Property
source§

fn add_multi_property(&mut self, key: &str, val: &str) -> &mut Self

Construct and append a Property
source§

fn timestamp(&mut self, dt: DateTime<Utc>) -> &mut Self

source§

fn get_timestamp(&self) -> Option<DateTime<Utc>>

Gets the DTSTAMP property.
source§

fn get_start(&self) -> Option<DatePerhapsTime>

Gets the DTSTART Property
source§

fn get_end(&self) -> Option<DatePerhapsTime>

Gets the DTEND Property
source§

fn priority(&mut self, priority: u32) -> &mut Self

Defines the relative priority. Read more
source§

fn get_priority(&self) -> Option<u32>

Gets the relative priority. Read more
source§

fn print(&self) -> Result<(), Error>

Prints to stdout
source§

fn summary(&mut self, desc: &str) -> &mut Self

Set the summary
source§

fn get_summary(&self) -> Option<&str>

Gets the summary
source§

fn description(&mut self, desc: &str) -> &mut Self

Set the description
source§

fn get_description(&self) -> Option<&str>

Gets the description
source§

fn uid(&mut self, uid: &str) -> &mut Self

Set the UID
source§

fn get_uid(&self) -> Option<&str>

Gets the UID
source§

fn sequence(&mut self, sequence: u32) -> &mut Self

Set the sequence
source§

fn get_sequence(&self) -> Option<u32>

Gets the SEQUENCE
source§

fn class(&mut self, class: Class) -> &mut Self

Set the visibility class
source§

fn get_class(&self) -> Option<Class>

Gets the visibility class
source§

fn url(&mut self, url: &str) -> &mut Self

Sets the URL.
source§

fn get_url(&self) -> Option<&str>

Gets the URL.
source§

fn last_modified(&mut self, dt: DateTime<Utc>) -> &mut Self

source§

fn get_last_modified(&self) -> Option<DateTime<Utc>>

Gets the LAST_MODIFIED property.
source§

fn created(&mut self, dt: DateTime<Utc>) -> &mut Self

source§

fn get_created(&self) -> Option<DateTime<Utc>>

Gets the CREATED property.
source§

impl Debug for Event

source§

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

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

impl Default for Event

source§

fn default() -> Event

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

impl EventLike for Event

source§

fn starts<T: Into<DatePerhapsTime>>(&mut self, dt: T) -> &mut Self

source§

fn ends<T: Into<DatePerhapsTime>>(&mut self, dt: T) -> &mut Self

source§

fn all_day(&mut self, date: NaiveDate) -> &mut Self

Set the DTSTART Property and DTEND Property, date only
source§

fn venue(&mut self, location: &str, venue_uid: &str) -> &mut Self

Set the LOCATION with a VVENUE UID iCalender venue draft
source§

fn location(&mut self, location: &str) -> &mut Self

Set the LOCATION 3.8.1.7. Location
source§

fn get_location(&self) -> Option<&str>

Gets the location
source§

fn alarm<A: Into<Alarm>>(&mut self, alarm: A) -> &mut Self

Set the ALARM for this event 3.6.6. Alarm Component
source§

impl From<Event> for CalendarComponent

source§

fn from(val: Event) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Event

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryInto<String> for Event

§

type Error = Error

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

fn try_into(self) -> Result<String, Self::Error>

Performs the conversion.
source§

impl Eq for Event

source§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
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,

§

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>,

§

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>,

§

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.