pub struct NarrativeBuilder { /* private fields */ }Expand description
Builder for constructing Narrative instances.
Implementations§
Source§impl NarrativeBuilder
impl NarrativeBuilder
Sourcepub fn id(self, id: NarrativeId) -> Self
pub fn id(self, id: NarrativeId) -> Self
Sets the narrative ID.
Sourcepub fn events(self, events: impl IntoIterator<Item = Event>) -> Self
pub fn events(self, events: impl IntoIterator<Item = Event>) -> Self
Adds multiple events.
Sets the author.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
Adds a metadata key-value pair.
Adds multiple tags.
Trait Implementations§
Source§impl Debug for NarrativeBuilder
impl Debug for NarrativeBuilder
Source§impl Default for NarrativeBuilder
impl Default for NarrativeBuilder
Source§fn default() -> NarrativeBuilder
fn default() -> NarrativeBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NarrativeBuilder
impl RefUnwindSafe for NarrativeBuilder
impl Send for NarrativeBuilder
impl Sync for NarrativeBuilder
impl Unpin for NarrativeBuilder
impl UnwindSafe for NarrativeBuilder
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