thot_core/db/resources/object.rs
1//! Database object functionality.
2use super::standard_properties::StandardProperties;
3use std::hash::Hash;
4
5/// Functionality for database objects.
6pub trait Object: Clone + Hash + PartialEq + Eq {}
7
8/// Functionality for standard objects.
9pub trait StandardObject: Object {
10 /// Retrieve a reference to the [`StandardProperties`] of the object.
11 fn properties(&self) -> &StandardProperties;
12
13 /// Retrieve a mutable reference to the [`StandardProperties`] of the object.
14 fn properties_mut(&mut self) -> &mut StandardProperties;
15}
16
17#[cfg(test)]
18#[path = "./object_test.rs"]
19mod object_test;