pub struct JsonLdMetadata {
pub context: Vec<String>,
pub graph: Vec<Value>,
}Expand description
JSON-LD metadata for semantic web integration.
Fields§
§context: Vec<String>JSON-LD context URIs.
graph: Vec<Value>JSON-LD graph containing structured data.
Implementations§
Source§impl JsonLdMetadata
impl JsonLdMetadata
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Add a context URI.
Sourcepub fn creative_work(
name: impl Into<String>,
author: impl Into<String>,
) -> Value
pub fn creative_work( name: impl Into<String>, author: impl Into<String>, ) -> Value
Create a JSON-LD representation of a creative work.
Sourcepub fn scholarly_article(entry: &BibliographyEntry) -> Value
pub fn scholarly_article(entry: &BibliographyEntry) -> Value
Create a JSON-LD representation of a scholarly article.
Trait Implementations§
Source§impl Clone for JsonLdMetadata
impl Clone for JsonLdMetadata
Source§fn clone(&self) -> JsonLdMetadata
fn clone(&self) -> JsonLdMetadata
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 JsonLdMetadata
impl Debug for JsonLdMetadata
Source§impl Default for JsonLdMetadata
impl Default for JsonLdMetadata
Source§impl<'de> Deserialize<'de> for JsonLdMetadata
impl<'de> Deserialize<'de> for JsonLdMetadata
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 JsonLdMetadata
impl PartialEq for JsonLdMetadata
Source§impl Serialize for JsonLdMetadata
impl Serialize for JsonLdMetadata
impl StructuralPartialEq for JsonLdMetadata
Auto Trait Implementations§
impl Freeze for JsonLdMetadata
impl RefUnwindSafe for JsonLdMetadata
impl Send for JsonLdMetadata
impl Sync for JsonLdMetadata
impl Unpin for JsonLdMetadata
impl UnsafeUnpin for JsonLdMetadata
impl UnwindSafe for JsonLdMetadata
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