Struct gedcomx::SourceDescription [−][src]
#[non_exhaustive]pub struct SourceDescription {}Show 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
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
Trait Implementations
Returns the “default value” for a type. Read more
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Error = GedcomxError
type Error = GedcomxError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = GedcomxError
type Error = GedcomxError
The type returned in the event of a conversion error.
Performs the conversion.
fn serialize_attributes(
&self,
source_attributes: Vec<OwnedAttribute>,
source_namespace: Namespace
) -> Result<(Vec<OwnedAttribute>, Namespace), String>
Auto Trait Implementations
impl RefUnwindSafe for SourceDescription
impl Send for SourceDescription
impl Sync for SourceDescription
impl Unpin for SourceDescription
impl UnwindSafe for SourceDescription
Blanket Implementations
Mutably borrows from an owned value. Read more