Skip to main content

resource_timeline/
activity.rs

1//! Identification of the activities that cause impacts.
2
3/// An opaque identifier of an activity, chosen by the caller.
4///
5/// The crate never interprets the value. It only tags impacts with it and reports it back in a
6/// [`Violation`](crate::Violation). Integration code maps it to its own activity records, for
7/// example to the start and end time points of a `temporal-control` network.
8#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
9#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
10#[cfg_attr(feature = "serde", serde(transparent))]
11pub struct ActivityId(pub u32);