pub struct SafetyMetric {
pub id: String,
pub entity_id: String,
pub period: NaiveDate,
pub total_hours_worked: u64,
pub recordable_incidents: u32,
pub lost_time_incidents: u32,
pub days_away: u32,
pub near_misses: u32,
pub fatalities: u32,
pub trir: Decimal,
pub ltir: Decimal,
pub dart_rate: Decimal,
}Expand description
Aggregate safety metrics for a period.
Fields§
§id: String§entity_id: String§period: NaiveDate§total_hours_worked: u64§recordable_incidents: u32§lost_time_incidents: u32§days_away: u32§near_misses: u32§fatalities: u32§trir: Decimal§ltir: Decimal§dart_rate: DecimalImplementations§
Source§impl SafetyMetric
impl SafetyMetric
Sourcepub fn computed_trir(&self) -> Decimal
pub fn computed_trir(&self) -> Decimal
TRIR (Total Recordable Incident Rate) = recordable × 200,000 / hours.
Sourcepub fn computed_ltir(&self) -> Decimal
pub fn computed_ltir(&self) -> Decimal
LTIR (Lost Time Incident Rate) = lost_time × 200,000 / hours.
Sourcepub fn computed_dart_rate(&self) -> Decimal
pub fn computed_dart_rate(&self) -> Decimal
DART (Days Away, Restricted, or Transferred) rate.
Trait Implementations§
Source§impl Clone for SafetyMetric
impl Clone for SafetyMetric
Source§fn clone(&self) -> SafetyMetric
fn clone(&self) -> SafetyMetric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SafetyMetric
impl Debug for SafetyMetric
Source§impl<'de> Deserialize<'de> for SafetyMetric
impl<'de> Deserialize<'de> for SafetyMetric
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 Serialize for SafetyMetric
impl Serialize for SafetyMetric
Source§impl ToNodeProperties for SafetyMetric
impl ToNodeProperties for SafetyMetric
Source§fn node_type_name(&self) -> &'static str
fn node_type_name(&self) -> &'static str
Entity type name (snake_case), e.g.
"uncertain_tax_position".Source§fn node_type_code(&self) -> u16
fn node_type_code(&self) -> u16
Numeric entity type code for registry, e.g.
416.Source§fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
Convert all fields to a property map with camelCase keys.
Auto Trait Implementations§
impl Freeze for SafetyMetric
impl RefUnwindSafe for SafetyMetric
impl Send for SafetyMetric
impl Sync for SafetyMetric
impl Unpin for SafetyMetric
impl UnsafeUnpin for SafetyMetric
impl UnwindSafe for SafetyMetric
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