Struct icalendar::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: &str, val: &str) -> &mut Self

Construct and append a Property
source§

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

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§

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

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 Todo

§

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

source§

impl StructuralPartialEq for Todo

Auto Trait Implementations§

§

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