pub struct Metadata {
pub title: Option<String>,
pub author: Option<String>,
pub subject: Option<String>,
pub keywords: Vec<String>,
pub created: Option<String>,
pub modified: Option<String>,
}Expand description
Document metadata: title, author, subject, keywords, timestamps.
All fields are optional. Default returns a fully empty metadata
(all None / empty Vec).
§Design Decision
Timestamps use Option<String> (ISO 8601) instead of chrono::DateTime.
Rationale: chrono adds ~250KB compile weight for two fields that Core
never does arithmetic on. Smithy crates parse and validate dates when
reading from format-specific sources.
§Examples
use hwpforge_core::Metadata;
let meta = Metadata::default();
assert!(meta.title.is_none());
assert!(meta.keywords.is_empty());Fields§
§title: Option<String>Document title.
Document author.
subject: Option<String>Document subject or description.
keywords: Vec<String>Searchable keywords.
created: Option<String>Creation timestamp in ISO 8601 format (e.g. "2026-02-07T10:30:00Z").
modified: Option<String>Last modification timestamp in ISO 8601 format.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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 JsonSchema for Metadata
impl JsonSchema for Metadata
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.