pub struct NarrativeMetadata {
pub created: Option<Timestamp>,
pub modified: Option<Timestamp>,
pub author: Option<String>,
pub description: Option<String>,
pub category: Option<String>,
pub extra: HashMap<String, String>,
}Expand description
Metadata associated with a narrative.
Fields§
§created: Option<Timestamp>When the narrative was created.
modified: Option<Timestamp>When the narrative was last modified.
Author or creator of the narrative.
description: Option<String>Description of the narrative.
category: Option<String>Category or type.
extra: HashMap<String, String>Additional key-value metadata.
Implementations§
Source§impl NarrativeMetadata
impl NarrativeMetadata
Sourcepub fn with_created_now() -> Self
pub fn with_created_now() -> Self
Creates metadata with creation timestamp set to now.
Trait Implementations§
Source§impl Clone for NarrativeMetadata
impl Clone for NarrativeMetadata
Source§fn clone(&self) -> NarrativeMetadata
fn clone(&self) -> NarrativeMetadata
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 NarrativeMetadata
impl Debug for NarrativeMetadata
Source§impl Default for NarrativeMetadata
impl Default for NarrativeMetadata
Source§fn default() -> NarrativeMetadata
fn default() -> NarrativeMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NarrativeMetadata
impl<'de> Deserialize<'de> for NarrativeMetadata
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 PartialEq for NarrativeMetadata
impl PartialEq for NarrativeMetadata
Source§impl Serialize for NarrativeMetadata
impl Serialize for NarrativeMetadata
impl StructuralPartialEq for NarrativeMetadata
Auto Trait Implementations§
impl Freeze for NarrativeMetadata
impl RefUnwindSafe for NarrativeMetadata
impl Send for NarrativeMetadata
impl Sync for NarrativeMetadata
impl Unpin for NarrativeMetadata
impl UnwindSafe for NarrativeMetadata
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