pub struct RelationshipBuilder(/* private fields */);Implementations§
Source§impl RelationshipBuilder
impl RelationshipBuilder
pub fn id<I: Into<Id>>(&mut self, id: I) -> &mut Self
pub fn lang<I: Into<Lang>>(&mut self, lang: I) -> &mut Self
Sourcepub fn source<I: TryInto<SourceReference, Error = GedcomxError>>(
&mut self,
source: I,
) -> Result<&mut Self>
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.
pub fn source_ref(&mut self, source_ref: SourceReference) -> &mut Self
Sourcepub fn analysis(&mut self, document: &Document) -> Result<&mut Self>
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.
pub fn note(&mut self, note: Note) -> &mut Self
pub fn confidence(&mut self, confidence: ConfidenceLevel) -> &mut Self
pub fn attribution(&mut self, attribution: Attribution) -> &mut Self
pub fn extracted(&mut self, extracted: bool) -> &mut Self
Sourcepub fn evidence(&mut self, e: &Relationship) -> Result<&mut Self>
pub fn evidence(&mut self, e: &Relationship) -> Result<&mut Self>
§Errors
Will return GedcomxError::NoId if a
conversion into EvidenceReference fails.
This happens if the passed argument has no id set.
Sourcepub fn media(&mut self, media: &SourceDescription) -> Result<&mut Self>
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.
pub fn identifier(&mut self, identifier: Identifier) -> &mut Self
pub fn relationship_type( &mut self, relationship_type: RelationshipType, ) -> &mut Self
Sourcepub fn person_1(&mut self, person: &Person) -> Result<&mut Self>
pub fn person_1(&mut self, person: &Person) -> Result<&mut Self>
§Errors
Will return GedcomxError::NoId if a
conversion into ResourceReference fails.
This happens if either person1 or person2 has no id set.
Sourcepub fn person_2(&mut self, person: &Person) -> Result<&mut Self>
pub fn person_2(&mut self, person: &Person) -> Result<&mut Self>
§Errors
Will return GedcomxError::NoId if a
conversion into ResourceReference fails.
This happens if either person1 or person2 has no id set.
pub fn fact(&mut self, fact: Fact) -> &mut Self
pub fn facts(&mut self, facts: Vec<Fact>) -> &mut Self
pub fn build(&self) -> Relationship
Auto Trait Implementations§
impl Freeze for RelationshipBuilder
impl RefUnwindSafe for RelationshipBuilder
impl Send for RelationshipBuilder
impl Sync for RelationshipBuilder
impl Unpin for RelationshipBuilder
impl UnwindSafe for RelationshipBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more