Skip to main content

Note

Struct Note 

Source
pub struct Note {
    pub value: Option<String>,
    pub mime: Option<String>,
    pub translation: Option<Translation>,
    pub citation: Option<Source>,
    pub language: Option<String>,
}
Expand description

A NOTE_STRUCTURE containing additional information for understanding the enclosing data.

Notes provide supplementary information submitted by the data contributor to help clarify or explain the genealogical data they’re attached to. They serve as contextual annotations that enhance the understanding of the associated records.

§Header Notes

When used as a substructure of HEAD, the note should describe the document’s genealogical scope in terms of “ancestors or descendants of” a specific person. This helps recipients understand what genealogical information the document contains.

§GEDCOM Specification

Conforms to the GEDCOM NOTE_STRUCTURE specification. See: https://gedcom.io/specifications/FamilySearchGEDCOMv7.html#NOTE See: https://gedcom.io/specifications/FamilySearchGEDCOMv7.html#NOTE_STRUCTURE

Fields§

§value: Option<String>§mime: Option<String>

tag: MIME, indicates the media type of the payload of the superstructure, as defined by BCP 13. As of version 7.0, only 2 media types are supported by this structure: text/plain and text/html

§translation: Option<Translation>

tag: TRAN, a type of TRAN for unstructured human-readable text, such as is found in NOTE and SNOTE payloads.

§citation: Option<Source>

tag: SOUR, a citation indicating that the pointed-to source record supports the claims made in the superstructure. See https://gedcom.io/specifications/FamilySearchGEDCOMv7.html#SOURCE_CITATION.

§language: Option<String>

tag: LANG, The primary human language of the superstructure. The primary language in which the Text-typed payloads of the superstructure and its substructures appear. See https://gedcom.io/specifications/FamilySearchGEDCOMv7.html#LANG.

Implementations§

Source§

impl Note

Source

pub fn new( tokenizer: &mut Tokenizer<'_>, level: u8, ) -> Result<Note, GedcomError>

Creates a new Note from a Tokenizer.

§Errors

This function will return an error if parsing fails.

Trait Implementations§

Source§

impl Clone for Note

Source§

fn clone(&self) -> Note

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Note

Source§

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

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

impl Default for Note

Source§

fn default() -> Note

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

impl Display for Note

Source§

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

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

impl ImprovedDebug for Note

Source§

fn debug(&self) -> impl Debug

Returns a wrapper that provides improved Debug output.
Source§

impl Parser for Note

Source§

fn parse( &mut self, tokenizer: &mut Tokenizer<'_>, level: u8, ) -> Result<(), GedcomError>

parse handles the NOTE tag

Source§

impl PartialEq for Note

Source§

fn eq(&self, other: &Note) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Note

Auto Trait Implementations§

§

impl Freeze for Note

§

impl RefUnwindSafe for Note

§

impl Send for Note

§

impl Sync for Note

§

impl Unpin for Note

§

impl UnsafeUnpin for Note

§

impl UnwindSafe for Note

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.