pub struct Activity { /* private fields */ }Expand description
The activity entity
The activity entity is used to store and manage an activity
Implementations§
source§impl Activity
impl Activity
sourcepub fn builder() -> ActivityBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> ActivityBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building Activity.
On the builder, call .guid(...)(optional), .category(...)(optional), .description(...)(optional), .begin(...)(optional), .activity_end_options(...)(optional), .kind(...)(optional), .activity_kind_options(...)(optional), .pomodoro_cycle_options(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Activity.
source§impl Activity
impl Activity
sourcepub fn guid(&self) -> &Option<ActivityGuid>
pub fn guid(&self) -> &Option<ActivityGuid>
The activity’s unique identifier
sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
The description of the activity
sourcepub fn begin(&self) -> &BeginDateTime
pub fn begin(&self) -> &BeginDateTime
The start date and time of the activity
pub fn activity_end_options(&self) -> &Option<ActivityEndOptions>
sourcepub fn kind(&self) -> &ActivityKind
pub fn kind(&self) -> &ActivityKind
The kind of activity
sourcepub fn activity_kind_options(&self) -> &Option<ActivityKindOptions>
pub fn activity_kind_options(&self) -> &Option<ActivityKindOptions>
Optional attributes for the activity kind
sourcepub fn pomodoro_cycle_options(&self) -> &Option<PomodoroCycle>
pub fn pomodoro_cycle_options(&self) -> &Option<PomodoroCycle>
The pomodoro cycle of the activity
source§impl Activity
impl Activity
sourcepub fn guid_mut(&mut self) -> &mut Option<ActivityGuid>
pub fn guid_mut(&mut self) -> &mut Option<ActivityGuid>
The activity’s unique identifier
sourcepub fn category_mut(&mut self) -> &mut Option<String>
pub fn category_mut(&mut self) -> &mut Option<String>
The category of the activity
pub fn activity_end_options_mut(&mut self) -> &mut Option<ActivityEndOptions>
source§impl Activity
impl Activity
sourcepub fn end_activity(&mut self, end_opts: ActivityEndOptions)
pub fn end_activity(&mut self, end_opts: ActivityEndOptions)
End the activity
§Arguments
end- The end date and time of the activityduration- ThePaceDurationof the activity
pub fn end_activity_with_duration_calc( &mut self, begin: BeginDateTime, end: NaiveDateTime ) -> PaceResult<()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Activity
impl<'de> Deserialize<'de> for Activity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 FromIterator<Activity> for ActivityLog
impl FromIterator<Activity> for ActivityLog
source§impl PartialEq for Activity
impl PartialEq for Activity
impl Eq for Activity
impl StructuralPartialEq for Activity
Auto Trait Implementations§
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnwindSafe for Activity
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.