pub struct ProvenanceRef {
pub doi: Option<String>,
pub pmid: Option<String>,
pub title: Option<String>,
pub span: Option<String>,
}Expand description
Phase β (v0.6): structured provenance reference attached to an
annotation (or any future note-shaped object). At least one
identifying field (doi, pmid, title) must be set when the
provenance is present; an all-empty ProvenanceRef is rejected by
validate_event_payload.
Fields§
§doi: Option<String>§pmid: Option<String>§title: Option<String>§span: Option<String>Verbatim quote / extraction span from the source.
Implementations§
Source§impl ProvenanceRef
impl ProvenanceRef
Sourcepub fn has_identifier(&self) -> bool
pub fn has_identifier(&self) -> bool
True iff at least one identifying field is set. Used by
validate_event_payload to reject all-empty provenance: {} objects.
Trait Implementations§
Source§impl Clone for ProvenanceRef
impl Clone for ProvenanceRef
Source§fn clone(&self) -> ProvenanceRef
fn clone(&self) -> ProvenanceRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProvenanceRef
impl Debug for ProvenanceRef
Source§impl<'de> Deserialize<'de> for ProvenanceRef
impl<'de> Deserialize<'de> for ProvenanceRef
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 ProvenanceRef
impl PartialEq for ProvenanceRef
Source§fn eq(&self, other: &ProvenanceRef) -> bool
fn eq(&self, other: &ProvenanceRef) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProvenanceRef
impl Serialize for ProvenanceRef
impl Eq for ProvenanceRef
impl StructuralPartialEq for ProvenanceRef
Auto Trait Implementations§
impl Freeze for ProvenanceRef
impl RefUnwindSafe for ProvenanceRef
impl Send for ProvenanceRef
impl Sync for ProvenanceRef
impl Unpin for ProvenanceRef
impl UnsafeUnpin for ProvenanceRef
impl UnwindSafe for ProvenanceRef
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.