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
sourceimpl 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.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more