scsys_time/timestamp/
impl_timestamp_repr.rs1use super::Timestamp;
6
7use crate::traits::RawTimestamp;
8
9impl<T> Timestamp<&T>
10where
11 T: RawTimestamp,
12{
13 pub fn cloned(&self) -> Timestamp<T>
15 where
16 T: Clone,
17 {
18 Timestamp(self.0.clone())
19 }
20 pub fn copied(&self) -> Timestamp<T>
22 where
23 T: Copy,
24 {
25 Timestamp(*self.0)
26 }
27}
28
29impl<T> Timestamp<&mut T>
30where
31 T: RawTimestamp,
32{
33 pub fn cloned(&self) -> Timestamp<T>
35 where
36 T: Clone,
37 {
38 Timestamp(self.0.clone())
39 }
40 pub fn copied(&self) -> Timestamp<T>
42 where
43 T: Copy,
44 {
45 Timestamp(*self.0)
46 }
47}