pub struct EventBuilder(/* private fields */);Implementations§
Source§impl EventBuilder
impl EventBuilder
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: &Event) -> Result<&mut Self>
pub fn evidence(&mut self, e: &Event) -> 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 event_type(&mut self, event_type: EventType) -> &mut Self
pub fn date(&mut self, date: Date) -> &mut Self
pub fn place(&mut self, place: PlaceReference) -> &mut Self
pub fn role(&mut self, role: EventRole) -> &mut Self
pub fn build(&self) -> Event
Auto Trait Implementations§
impl Freeze for EventBuilder
impl RefUnwindSafe for EventBuilder
impl Send for EventBuilder
impl Sync for EventBuilder
impl Unpin for EventBuilder
impl UnwindSafe for EventBuilder
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