icalendar

Struct Todo

Source
pub struct Todo { /* private fields */ }
Expand description

Implementations§

Source§

impl Todo

Source

pub fn new() -> Self

Creates a new Todo.

Source

pub fn done(&mut self) -> Self

End of builder pattern. copies over everything

Source

pub fn percent_complete(&mut self, percent: u8) -> &mut Self

Set the PERCENT-COMPLETE property

Ranges between 0 - 100

Source

pub fn get_percent_complete(&self) -> Option<u8>

Gets the PERCENT-COMPLETE property.

Ranges between 0 - 100.

Source

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

Set the DUE property

See CalendarDateTime for info how are different chrono types converted automatically.

Source

pub fn get_due(&self) -> Option<DatePerhapsTime>

Gets the DUE property

Source

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

Set the COMPLETED property

Per RFC 5545, Section 3.8.2.1, this must be a date-time in UTC format.

Source

pub fn get_completed(&self) -> Option<DateTime<Utc>>

Gets the COMPLETED property

Per RFC 5545, Section 3.8.2.1, this must be a date-time in UTC format.

Source

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

Defines the overall status or confirmation

Source

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

Gets the overall status.

Trait Implementations§

Source§

impl Clone for Todo

Source§

fn clone(&self) -> Todo

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 Todo

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 Todo

Source§

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

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

impl Default for Todo

Source§

fn default() -> Todo

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

impl EventLike for Todo

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<Todo> for CalendarComponent

Source§

fn from(val: Todo) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Todo

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryInto<String> for Todo

Source§

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 Todo

Source§

impl StructuralPartialEq for Todo

Auto Trait Implementations§

§

impl Freeze for Todo

§

impl RefUnwindSafe for Todo

§

impl Send for Todo

§

impl Sync for Todo

§

impl Unpin for Todo

§

impl UnwindSafe for Todo

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, dst: *mut u8)

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

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

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.