belief_spread/uuidd.rs
1use uuid::Uuid;
2
3/// Something with a [Uuid].
4///
5/// This trait can be used by things that should have a [Uuid].
6pub trait UUIDd {
7 /// Get the UUID of the object that implements this.
8 fn uuid(&self) -> &Uuid;
9
10 /// Set the UUID of the object that implements this.
11 ///
12 /// # Arguments
13 ///
14 /// - `u`: The new [Uuid].
15 fn set_uuid(&mut self, u: Uuid);
16}