Mercurial > core / rust/lib/obj/src/object/meta.rs
changeset 698: |
96958d3eb5b0 |
parent: |
c7165d93a9eb
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
4 use chrono::{DateTime, Utc}; 5 use serde::{Deserialize, Serialize}; 8 /// This struct is built into other Objects and provides contextual data 9 #[derive(Serialize, Deserialize, Debug, Hash)] 12 properties: Option<Vec<Property>>, 13 timestamp: DateTime<Utc>, 17 pub fn new() -> Self { 21 timestamp: Utc::now(), 26 impl Default for Meta { 27 fn default() -> Self { 32 impl Objective for Meta {} 36 /// An isolated property consisting of a (key,val) pair. 38 /// TODO <2021-08-17 Tue 01:28> - this should be a trait. make 39 /// metadata module for this. 40 #[derive(Serialize, Deserialize, Debug, Hash)] 48 /// A summary of an object. 50 /// TODO <2021-08-17 Tue 01:30> make this a trait too. 51 #[derive(Serialize, Deserialize, Debug, Hash)] 59 /// A note pertaining to one or many objects. 60 #[derive(Serialize, Deserialize, Debug, Hash)]