pub struct DerivationRecord {
pub source: String,
pub derivation_type: DerivationType,
pub description: Option<String>,
pub timestamp: Option<DateTime<Utc>>,
pub license: Option<String>,
}Expand description
Record of content derived from another source.
Fields§
§source: StringSource document or resource identifier.
derivation_type: DerivationTypeType of derivation.
description: Option<String>Human-readable description.
timestamp: Option<DateTime<Utc>>When the derivation occurred.
license: Option<String>License under which the source was used.
Implementations§
Source§impl DerivationRecord
impl DerivationRecord
Sourcepub fn new(source: impl Into<String>, derivation_type: DerivationType) -> Self
pub fn new(source: impl Into<String>, derivation_type: DerivationType) -> Self
Create a new derivation record.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set a description.
Sourcepub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self
pub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self
Set the timestamp.
Sourcepub fn with_license(self, license: impl Into<String>) -> Self
pub fn with_license(self, license: impl Into<String>) -> Self
Set the license.
Trait Implementations§
Source§impl Clone for DerivationRecord
impl Clone for DerivationRecord
Source§fn clone(&self) -> DerivationRecord
fn clone(&self) -> DerivationRecord
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 DerivationRecord
impl Debug for DerivationRecord
Source§impl<'de> Deserialize<'de> for DerivationRecord
impl<'de> Deserialize<'de> for DerivationRecord
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 DerivationRecord
impl PartialEq for DerivationRecord
Source§impl Serialize for DerivationRecord
impl Serialize for DerivationRecord
impl Eq for DerivationRecord
impl StructuralPartialEq for DerivationRecord
Auto Trait Implementations§
impl Freeze for DerivationRecord
impl RefUnwindSafe for DerivationRecord
impl Send for DerivationRecord
impl Sync for DerivationRecord
impl Unpin for DerivationRecord
impl UnsafeUnpin for DerivationRecord
impl UnwindSafe for DerivationRecord
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.