pub struct DublinCore {
pub version: String,
pub terms: DublinCoreTerms,
}Expand description
Dublin Core metadata file structure.
This represents the metadata/dublin-core.json file in a Codex document.
Fields§
§version: StringDublin Core version (e.g., “1.1”).
terms: DublinCoreTermsDublin Core terms.
Implementations§
Source§impl DublinCore
impl DublinCore
Sourcepub fn new(title: impl Into<String>, creator: impl Into<String>) -> Self
pub fn new(title: impl Into<String>, creator: impl Into<String>) -> Self
Create a new Dublin Core metadata structure with required fields.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Get the description if present.
Sourcepub fn contributors(&self) -> Vec<&str>
pub fn contributors(&self) -> Vec<&str>
Get the contributor(s) as a slice.
Sourcepub fn identifier(&self) -> Option<&str>
pub fn identifier(&self) -> Option<&str>
Get the identifier if present.
Sourcepub fn set_creators(&mut self, creators: Vec<String>)
pub fn set_creators(&mut self, creators: Vec<String>)
Set the creator(s).
Sourcepub fn set_description(&mut self, description: Option<String>)
pub fn set_description(&mut self, description: Option<String>)
Set the description.
Sourcepub fn set_subjects(&mut self, subjects: Vec<String>)
pub fn set_subjects(&mut self, subjects: Vec<String>)
Set the subject(s).
Sourcepub fn set_publisher(&mut self, publisher: Option<String>)
pub fn set_publisher(&mut self, publisher: Option<String>)
Set the publisher.
Sourcepub fn set_language(&mut self, language: Option<String>)
pub fn set_language(&mut self, language: Option<String>)
Set the language.
Sourcepub fn set_rights(&mut self, rights: Option<String>)
pub fn set_rights(&mut self, rights: Option<String>)
Set the rights.
Trait Implementations§
Source§impl Clone for DublinCore
impl Clone for DublinCore
Source§fn clone(&self) -> DublinCore
fn clone(&self) -> DublinCore
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 DublinCore
impl Debug for DublinCore
Source§impl<'de> Deserialize<'de> for DublinCore
impl<'de> Deserialize<'de> for DublinCore
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 DublinCore
impl PartialEq for DublinCore
Source§impl Serialize for DublinCore
impl Serialize for DublinCore
impl Eq for DublinCore
impl StructuralPartialEq for DublinCore
Auto Trait Implementations§
impl Freeze for DublinCore
impl RefUnwindSafe for DublinCore
impl Send for DublinCore
impl Sync for DublinCore
impl Unpin for DublinCore
impl UnsafeUnpin for DublinCore
impl UnwindSafe for DublinCore
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.