pub struct ArticleMetadataBuilder { /* private fields */ }Expand description
Builder for ArticleMetadata.
Implementations§
Source§impl ArticleMetadataBuilder
impl ArticleMetadataBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn defined_type(self, defined_type: DefinedType) -> Self
pub fn defined_type(self, defined_type: DefinedType) -> Self
Sets the defined type.
Sourcepub fn reference(self, reference: impl Into<String>) -> Self
pub fn reference(self, reference: impl Into<String>) -> Self
Adds one reference URL or citation.
Sourcepub fn category_id(self, category: impl Into<CategoryId>) -> Self
pub fn category_id(self, category: impl Into<CategoryId>) -> Self
Adds one category ID.
Adds one author reference.
Adds one author by ID.
Adds one author by name.
Sourcepub fn custom_field_text(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn custom_field_text( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Adds one string custom field.
Sourcepub fn custom_field_json(self, name: impl Into<String>, value: Value) -> Self
pub fn custom_field_json(self, name: impl Into<String>, value: Value) -> Self
Adds one raw JSON custom field.
Sourcepub fn license_id(self, license: impl Into<LicenseId>) -> Self
pub fn license_id(self, license: impl Into<LicenseId>) -> Self
Sets the license ID.
Sourcepub fn resource_doi(self, resource_doi: impl Into<String>) -> Self
pub fn resource_doi(self, resource_doi: impl Into<String>) -> Self
Sets the related resource DOI.
Sourcepub fn resource_title(self, resource_title: impl Into<String>) -> Self
pub fn resource_title(self, resource_title: impl Into<String>) -> Self
Sets the related resource title.
Sourcepub fn build(self) -> Result<ArticleMetadata, ArticleMetadataBuildError>
pub fn build(self) -> Result<ArticleMetadata, ArticleMetadataBuildError>
Trait Implementations§
Source§impl Clone for ArticleMetadataBuilder
impl Clone for ArticleMetadataBuilder
Source§fn clone(&self) -> ArticleMetadataBuilder
fn clone(&self) -> ArticleMetadataBuilder
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 ArticleMetadataBuilder
impl Debug for ArticleMetadataBuilder
Source§impl Default for ArticleMetadataBuilder
impl Default for ArticleMetadataBuilder
Source§fn default() -> ArticleMetadataBuilder
fn default() -> ArticleMetadataBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ArticleMetadataBuilder
impl RefUnwindSafe for ArticleMetadataBuilder
impl Send for ArticleMetadataBuilder
impl Sync for ArticleMetadataBuilder
impl Unpin for ArticleMetadataBuilder
impl UnsafeUnpin for ArticleMetadataBuilder
impl UnwindSafe for ArticleMetadataBuilder
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