pub struct ActivityDefinitionBuilder<'a> { /* private fields */ }Expand description
A Type that knows how to construct an ActivityDefinition
Implementations§
Source§impl<'a> ActivityDefinitionBuilder<'a>
impl<'a> ActivityDefinitionBuilder<'a>
Sourcepub fn name(self, tag: &MyLanguageTag, label: &str) -> Result<Self, DataError>
pub fn name(self, tag: &MyLanguageTag, label: &str) -> Result<Self, DataError>
Add the given label to the name dictionary keyed by the given tag.
Raise DataError if tag is not a valid Language Tag.
Sourcepub fn description(
self,
tag: &MyLanguageTag,
label: &str,
) -> Result<Self, DataError>
pub fn description( self, tag: &MyLanguageTag, label: &str, ) -> Result<Self, DataError>
Add the given label to the description dictionary keyed by the given
tag.
Raise DataError if tag is not a valid Language Tag.
Sourcepub fn interaction_type(self, val: InteractionType) -> Self
pub fn interaction_type(self, val: InteractionType) -> Self
Set the interaction_type field.
Sourcepub fn correct_responses_pattern(self, val: &str) -> Result<Self, DataError>
pub fn correct_responses_pattern(self, val: &str) -> Result<Self, DataError>
Add val to correct responses pattern.
Sourcepub fn choices(self, val: InteractionComponent) -> Result<Self, DataError>
pub fn choices(self, val: InteractionComponent) -> Result<Self, DataError>
Add val to choices.
Sourcepub fn scale(self, val: InteractionComponent) -> Result<Self, DataError>
pub fn scale(self, val: InteractionComponent) -> Result<Self, DataError>
Add val to scale.
Sourcepub fn source(self, val: InteractionComponent) -> Result<Self, DataError>
pub fn source(self, val: InteractionComponent) -> Result<Self, DataError>
Add val to source.
Sourcepub fn target(self, val: InteractionComponent) -> Result<Self, DataError>
pub fn target(self, val: InteractionComponent) -> Result<Self, DataError>
Add val to target.
Sourcepub fn steps(self, val: InteractionComponent) -> Result<Self, DataError>
pub fn steps(self, val: InteractionComponent) -> Result<Self, DataError>
Add val to steps.
Sourcepub fn extension(self, key: &str, value: &Value) -> Result<Self, DataError>
pub fn extension(self, key: &str, value: &Value) -> Result<Self, DataError>
Add an extension’s key and value pair.
Sourcepub fn build(self) -> Result<ActivityDefinition, DataError>
pub fn build(self) -> Result<ActivityDefinition, DataError>
Create an ActivityDefinition from set field values.
Raise DataError if no field was set.
Trait Implementations§
Source§impl<'a> Debug for ActivityDefinitionBuilder<'a>
impl<'a> Debug for ActivityDefinitionBuilder<'a>
Source§impl<'a> Default for ActivityDefinitionBuilder<'a>
impl<'a> Default for ActivityDefinitionBuilder<'a>
Source§fn default() -> ActivityDefinitionBuilder<'a>
fn default() -> ActivityDefinitionBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ActivityDefinitionBuilder<'a>
impl<'a> RefUnwindSafe for ActivityDefinitionBuilder<'a>
impl<'a> Send for ActivityDefinitionBuilder<'a>
impl<'a> Sync for ActivityDefinitionBuilder<'a>
impl<'a> Unpin for ActivityDefinitionBuilder<'a>
impl<'a> UnsafeUnpin for ActivityDefinitionBuilder<'a>
impl<'a> UnwindSafe for ActivityDefinitionBuilder<'a>
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