pub struct Record {Show 16 fields
pub created: Option<DateTime<Utc>>,
pub modified: Option<DateTime<Utc>>,
pub id: RecordId,
pub recid: String,
pub conceptrecid: Option<ConceptRecId>,
pub doi: Option<Doi>,
pub conceptdoi: Option<Doi>,
pub metadata: RecordMetadata,
pub files: Vec<RecordFile>,
pub links: RecordLinks,
pub parent: Option<RecordParent>,
pub pids: Option<RecordPids>,
pub stats: Option<RecordStats>,
pub status: RecordPublicationStatus,
pub revision: Option<u64>,
pub extra: BTreeMap<String, Value>,
}Expand description
Published record resource returned by Zenodo’s records API.
Fields§
§created: Option<DateTime<Utc>>Record creation timestamp, when present.
modified: Option<DateTime<Utc>>Record modification timestamp, when present.
id: RecordIdRecord identifier.
recid: StringString-form record identifier as returned by Zenodo.
conceptrecid: Option<ConceptRecId>Concept record identifier shared across versions.
doi: Option<Doi>Version-specific DOI, when present.
conceptdoi: Option<Doi>Concept DOI shared across versions, when present.
metadata: RecordMetadataTyped record metadata.
files: Vec<RecordFile>Files exposed on the record.
links: RecordLinksKnown record link relations.
parent: Option<RecordParent>Parent record block, when present.
pids: Option<RecordPids>Persistent identifiers block, when present.
stats: Option<RecordStats>Record usage statistics, when present.
status: RecordPublicationStatusPublication status reported by Zenodo.
revision: Option<u64>Revision number, when present.
extra: BTreeMap<String, Value>Additional untyped fields preserved for forward compatibility.
Implementations§
Source§impl Record
impl Record
Sourcepub fn latest_url(&self) -> Option<&Url>
pub fn latest_url(&self) -> Option<&Url>
Returns the link to the latest record version, when present.
Sourcepub fn archive_url(&self) -> Option<&Url>
pub fn archive_url(&self) -> Option<&Url>
Returns the record archive link, when present.
Sourcepub fn file_by_key(&self, key: &str) -> Option<&RecordFile>
pub fn file_by_key(&self, key: &str) -> Option<&RecordFile>
Finds a file by exact key.