Struct gedcomx::SourceDescription
source · #[non_exhaustive]pub struct SourceDescription {Show 22 fields
pub id: Option<Id>,
pub resource_type: Option<ResourceType>,
pub citations: Vec<SourceCitation>,
pub media_type: Option<String>,
pub about: Option<Uri>,
pub mediator: Option<ResourceReference>,
pub publisher: Option<ResourceReference>,
pub authors: Vec<ResourceReference>,
pub sources: Vec<SourceReference>,
pub analysis: Option<ResourceReference>,
pub component_of: Option<SourceReference>,
pub titles: Vec<TextValue>,
pub notes: Vec<Note>,
pub attribution: Option<Attribution>,
pub rights: Vec<ResourceReference>,
pub coverage: Vec<Coverage>,
pub descriptions: Vec<TextValue>,
pub identifiers: Vec<Identifier>,
pub created: Option<Timestamp>,
pub modified: Option<Timestamp>,
pub published: Option<Timestamp>,
pub repository: Option<ResourceReference>,
}
Expand description
A description of a source of genealogical information.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: Option<Id>
An identifier for the data structure holding the source description data.
resource_type: Option<ResourceType>
The type of resource being described.
citations: Vec<SourceCitation>
The citation(s) for this source.
At least one citation MUST be provided. If more than one citation is provided, citations are assumed to be given in order of preference, with the most preferred citation in the first position in the list.
media_type: Option<String>
A hint about the media type of the resource being described.
If provided, MUST be a valid MIME (media) type as specified by RFC 4288.
about: Option<Uri>
A uniform resource identifier (URI) for the resource being described.
mediator: Option<ResourceReference>
A reference to the entity that mediates access to the described source.
If provided, MUST resolve to an instance of http://gedcomx.org/v1/Agent.
publisher: Option<ResourceReference>
A reference to the entity responsible for making the described source available.
If provided, MUST resolve to an instance of http://gedcomx.org/v1/Agent.
A reference to the entities that authored the described source.
If provided, MUST resolve to an instance of http://gedcomx.org/v1/Agent.
sources: Vec<SourceReference>
A list of references to any sources from which this source is derived.
analysis: Option<ResourceReference>
A reference to a document containing analysis about this source.
If provided, MUST resolve to an instance of http://gedcomx.org/v1/Document of type http://gedcomx.org/Analysis.
component_of: Option<SourceReference>
A reference to the source that contains this source, i.e. its parent context. Used when the description of a source is not complete without the description of its parent (or containing) source.
titles: Vec<TextValue>
The display name(s) for this source.
If more than one title is provided, titles are assumed to be given in order of preference, with the most preferred title in the first position in the list.
notes: Vec<Note>
A list of notes about a source.
attribution: Option<Attribution>
The attribution of this source description.
If not provided, the attribution of the containing data set (e.g. file) of the source description is assumed.
rights: Vec<ResourceReference>
The rights for this resource.
coverage: Vec<Coverage>
The coverage of the resource.
descriptions: Vec<TextValue>
Human-readable descriptions of this source.
If more than one description is provided, descriptions are assumed to be given in order of preference, with the most preferred description in the first position in the list.
identifiers: Vec<Identifier>
A list of identifiers for the resource being described.
created: Option<Timestamp>
Timestamp of when the resource being described was created.
modified: Option<Timestamp>
Timestamp of when the resource being described was modified.
published: Option<Timestamp>
Timestamp of when the resource being described was published.
repository: Option<ResourceReference>
A reference to the repository that contains the described resource.
If provided, MUST resolve to an instance of http://gedcomx.org/v1/Agent.
Implementations§
source§impl SourceDescription
impl SourceDescription
pub fn new( id: Option<Id>, resource_type: Option<ResourceType>, citations: Vec<SourceCitation>, media_type: Option<String>, about: Option<Uri>, mediator: Option<ResourceReference>, publisher: Option<ResourceReference>, authors: Vec<ResourceReference>, sources: Vec<SourceReference>, analysis: Option<ResourceReference>, component_of: Option<SourceReference>, titles: Vec<TextValue>, notes: Vec<Note>, attribution: Option<Attribution>, rights: Vec<ResourceReference>, coverage: Vec<Coverage>, descriptions: Vec<TextValue>, identifiers: Vec<Identifier>, created: Option<Timestamp>, modified: Option<Timestamp>, published: Option<Timestamp>, repository: Option<ResourceReference> ) -> Self
pub fn builder(citation: SourceCitation) -> SourceDescriptionBuilder
Trait Implementations§
source§impl Arbitrary for SourceDescription
impl Arbitrary for SourceDescription
source§impl Clone for SourceDescription
impl Clone for SourceDescription
source§fn clone(&self) -> SourceDescription
fn clone(&self) -> SourceDescription
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SourceDescription
impl Debug for SourceDescription
source§impl Default for SourceDescription
impl Default for SourceDescription
source§fn default() -> SourceDescription
fn default() -> SourceDescription
source§impl<'de> Deserialize<'de> for SourceDescription
impl<'de> Deserialize<'de> for SourceDescription
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>,
source§impl PartialEq<SourceDescription> for SourceDescription
impl PartialEq<SourceDescription> for SourceDescription
source§fn eq(&self, other: &SourceDescription) -> bool
fn eq(&self, other: &SourceDescription) -> bool
self
and other
values to be equal, and is used
by ==
.