Struct PlaceDescriptionBuilder

Source
pub struct PlaceDescriptionBuilder(/* private fields */);

Implementations§

Source§

impl PlaceDescriptionBuilder

Source

pub fn id<I: Into<Id>>(&mut self, id: I) -> &mut Self

Source

pub fn lang<I: Into<Lang>>(&mut self, lang: I) -> &mut Self

Source

pub fn source<I: TryInto<SourceReference, Error = GedcomxError>>( &mut self, source: I, ) -> Result<&mut Self>

§Errors

Will return GedcomxError::NoId if a conversion into SourceReference fails. This happens if source has no id set.

Source

pub fn source_ref(&mut self, source_ref: SourceReference) -> &mut Self

Source

pub fn analysis(&mut self, document: &Document) -> Result<&mut Self>

§Errors

Will return GedcomxError if a conversion into Document fails. This happens if document has no id set or has the wrong document_type.

Source

pub fn note(&mut self, note: Note) -> &mut Self

Source

pub fn confidence(&mut self, confidence: ConfidenceLevel) -> &mut Self

Source

pub fn attribution(&mut self, attribution: Attribution) -> &mut Self

Source

pub fn extracted(&mut self, extracted: bool) -> &mut Self

Source

pub fn evidence(&mut self, e: &PlaceDescription) -> Result<&mut Self>

§Errors

Will return GedcomxError::NoId if a conversion into EvidenceReference fails. This happens if the passed argument has no id set.

Source

pub fn media(&mut self, media: &SourceDescription) -> Result<&mut Self>

§Errors

Will return GedcomxError::NoId if a conversion into SourceReference fails. This happens if media has no id set.

Source

pub fn identifier(&mut self, identifier: Identifier) -> &mut Self

Source

pub fn name<I: Into<TextValue>>(&mut self, name: I) -> &mut Self

Source

pub fn place_type(&mut self, place_type: Uri) -> &mut Self

Source

pub fn place(&mut self, place: ResourceReference) -> &mut Self

Source

pub fn jurisdiction( &mut self, jurisdiction: &PlaceDescription, ) -> Result<&mut Self>

§Errors

Will return GedcomxError::NoId if a conversion into ResourceReference fails. This happens if jurisdiction has no id set.

Source

pub fn latitude_and_longitude( &mut self, latitude: f64, longitude: f64, ) -> &mut Self

Source

pub fn temporal_description(&mut self, date: Date) -> &mut Self

Source

pub fn spatial_description( &mut self, description: ResourceReference, ) -> &mut Self

Source

pub fn build(&self) -> PlaceDescription

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.