pub struct Activity {
pub place: Place,
pub schedule: Schedule,
pub job: Option<Arc<Single>>,
pub commute: Option<Commute>,
}Expand description
Represents activity which is needed to be performed.
Fields§
§place: PlaceSpecifies activity details.
schedule: ScheduleSpecifies activity’s schedule including commute time.
job: Option<Arc<Single>>Specifies associated job. Empty if it has no association with a single job (e.g. tour start or end).
If single job is part of multi job, then original job can be received via retrieve_job method.
commute: Option<Commute>An extra commute time to the place.
Implementations§
source§impl Activity
impl Activity
sourcepub fn new_with_job(job: Arc<Single>) -> Self
pub fn new_with_job(job: Arc<Single>) -> Self
Creates an activity with a job.
sourcepub fn has_same_job(&self, job: &Job) -> bool
pub fn has_same_job(&self, job: &Job) -> bool
Checks whether activity has given job.
sourcepub fn retrieve_job(&self) -> Option<Job>
pub fn retrieve_job(&self) -> Option<Job>
Returns job if activity has it.