Struct gedcomx::Fact [−][src]
#[non_exhaustive]pub struct Fact { pub id: Option<Id>, pub lang: Option<Lang>, pub sources: Vec<SourceReference>, pub analysis: Option<ResourceReference>, pub notes: Vec<Note>, pub confidence: Option<ConfidenceLevel>, pub attribution: Option<Attribution>, pub fact_type: FactType, pub date: Option<Date>, pub place: Option<PlaceReference>, pub value: Option<String>, pub qualifiers: Vec<Qualifier>, }
Expand description
A data item that is presumed to be true about a specific subject, such as a person or relationship.
Events Versus Facts
GEDCOM X implementations need to be able to recognize the difference between the concept of an “event” and the concept of a “fact” as defined by this specification in order to correctly use the data types associated with these concepts. This section is provided for the purpose of explicitly defining and distinguishing the two concepts.
An “event” is an occurrence that happened at a specific time or period of time, often at a specific place or set of places. Genealogically relevant events are often described by referencing the persons that played a role in that event. Hence events often refer to persons and might infer relationships, but events are described independently of those persons and relationships.
A “fact” is a data item that is presumed to be true about a specific subject, such as a person or relationship. A time or place is often, but not always, applicable to a fact. Facts do not exist outside the scope of the subject to which they apply.
Events are often used to infer facts. A marriage event, for example, infers the fact that two persons were married, and birth event infers the fact that a person was born. Facts also sometimes infer events, but the existence of a fact might not always justify a description of an event. For example, a birth fact provided by a census record might not warrant a description of a birth event, even though the existence of such an event is implied. On the other hand, a birth record that provides information about biological parents, adoptive parents, additional witnesses, etc. might justify a description of the event in addition to descriptions of any facts provided by the record.
Despite the occasional inference of facts from events and vice versa, this specification dictates that the two concepts are described independently. This version of the specification does not provide a direct association between instances of the two data types, although an indirect association can be found via the event role.
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 conclusion data. The id is to be used as a “fragment identifier” as defined by RFC 3986, Section 3.5.
lang: Option<Lang>
The locale identifier for the conclusion.
sources: Vec<SourceReference>
The list of references to the sources of related to this conclusion.
Note that the sources referenced from conclusions are also considered
to be sources of the entities that contain them. For example, a source
associated with the Name
of a Person
is also source for the
Person
.
analysis: Option<ResourceReference>
A reference to the analysis document explaining the analysis that went into this conclusion. If provided, MUST resolve to an instance of Document of type Analysis.
notes: Vec<Note>
A list of notes about this conclusion.
confidence: Option<ConfidenceLevel>
The level of confidence the contributor has about the data.
attribution: Option<Attribution>
The attribution of this conclusion. If not provided, the attribution of the containing data set (e.g. file) of the conclusion is assumed.
fact_type: FactType
The type of the fact.
date: Option<Date>
The date of applicability of the fact.
place: Option<PlaceReference>
A reference to the place applicable to this fact.
value: Option<String>
The value of the fact.
qualifiers: Vec<Qualifier>
Qualifiers to add additional details about the fact.
If present, use of a
FactQualifier
is
RECOMMENDED.
Implementations
pub fn new(
id: Option<Id>,
lang: Option<Lang>,
sources: Vec<SourceReference>,
analysis: Option<ResourceReference>,
notes: Vec<Note>,
confidence: Option<ConfidenceLevel>,
attribution: Option<Attribution>,
fact_type: FactType,
date: Option<Date>,
place: Option<PlaceReference>,
value: Option<String>,
qualifiers: Vec<Qualifier>
) -> Self
Trait Implementations
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
fn serialize_attributes(
&self,
source_attributes: Vec<OwnedAttribute>,
source_namespace: Namespace
) -> Result<(Vec<OwnedAttribute>, Namespace), String>
Auto Trait Implementations
impl RefUnwindSafe for Fact
impl UnwindSafe for Fact
Blanket Implementations
Mutably borrows from an owned value. Read more