pub struct ArticleMetadata {Show 14 fields
pub title: String,
pub description: Option<String>,
pub defined_type: DefinedType,
pub tags: Vec<String>,
pub keywords: Vec<String>,
pub references: Vec<String>,
pub categories: Vec<CategoryId>,
pub authors: Vec<AuthorReference>,
pub custom_fields: BTreeMap<String, Value>,
pub funding: Option<String>,
pub license: Option<LicenseId>,
pub doi: Option<Doi>,
pub resource_doi: Option<String>,
pub resource_title: Option<String>,
}Expand description
High-level create/update payload used by workflow helpers.
Fields§
§title: StringTitle of the article.
description: Option<String>Optional description.
defined_type: DefinedTypeRequired item type.
Optional tags.
keywords: Vec<String>Optional keywords.
references: Vec<String>Optional references.
categories: Vec<CategoryId>Optional category identifiers.
Optional author references.
custom_fields: BTreeMap<String, Value>Optional custom fields.
funding: Option<String>Optional funding string.
license: Option<LicenseId>Optional license identifier.
doi: Option<Doi>Optional pre-reserved DOI.
resource_doi: Option<String>Optional related resource DOI.
resource_title: Option<String>Optional related resource title.
Implementations§
Source§impl ArticleMetadata
impl ArticleMetadata
Sourcepub fn builder() -> ArticleMetadataBuilder
pub fn builder() -> ArticleMetadataBuilder
Starts building article metadata.
§Examples
use figshare_rs::{ArticleMetadata, DefinedType};
let metadata = ArticleMetadata::builder()
.title("Example dataset")
.defined_type(DefinedType::Dataset)
.author_named("Doe, Jane")
.tag("example")
.build()?;
assert_eq!(metadata.title, "Example dataset");
assert_eq!(metadata.defined_type, DefinedType::Dataset);
assert_eq!(metadata.tags, vec!["example".to_owned()]);
assert_eq!(metadata.authors.len(), 1);Trait Implementations§
Source§impl Clone for ArticleMetadata
impl Clone for ArticleMetadata
Source§fn clone(&self) -> ArticleMetadata
fn clone(&self) -> ArticleMetadata
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 ArticleMetadata
impl Debug for ArticleMetadata
Source§impl PartialEq for ArticleMetadata
impl PartialEq for ArticleMetadata
impl StructuralPartialEq for ArticleMetadata
Auto Trait Implementations§
impl Freeze for ArticleMetadata
impl RefUnwindSafe for ArticleMetadata
impl Send for ArticleMetadata
impl Sync for ArticleMetadata
impl Unpin for ArticleMetadata
impl UnsafeUnpin for ArticleMetadata
impl UnwindSafe for ArticleMetadata
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