Struct GedcomData

Source
pub struct GedcomData {
    pub header: Header,
    pub submitters: Vec<Submitter>,
    pub individuals: Vec<Individual>,
    pub families: Vec<Family>,
    pub repositories: Vec<Repository>,
    pub sources: Vec<Source>,
    pub multimedia: Vec<Media>,
}
Expand description

The data structure representing all the data within a gedcom file

Fields§

§header: Header

Header containing file metadata

§submitters: Vec<Submitter>

List of submitters of the facts

§individuals: Vec<Individual>

Individuals within the family tree

§families: Vec<Family>

The family units of the tree, representing relationships between individuals

§repositories: Vec<Repository>

A data repository where sources are held

§sources: Vec<Source>

Sources of facts. ie. book, document, census, etc.

§multimedia: Vec<Media>

A multimedia asset linked to a fact

Implementations§

Source§

impl GedcomData

Source

pub fn add_family(&mut self, family: Family)

Adds a Family (a relationship between individuals) to the tree

Source

pub fn add_individual(&mut self, individual: Individual)

Adds an Individual to the tree

Source

pub fn add_repository(&mut self, repo: Repository)

Adds a data Repository to the tree

Source

pub fn add_source(&mut self, source: Source)

Adds a Source to the tree

Source

pub fn add_submitter(&mut self, submitter: Submitter)

Adds a Submitter to the tree

Source

pub fn stats(&self)

Outputs a summary of data contained in the tree to stdout

Trait Implementations§

Source§

impl Debug for GedcomData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GedcomData

Source§

fn default() -> GedcomData

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.