pub struct InteractionComponent { /* private fields */ }Expand description
Depending on the value of the interactionType property of an
ActivityDefinition, an Activity can provide additional
properties, each potentially being a list of InteractionComponents.
Implementations§
Source§impl InteractionComponent
impl InteractionComponent
Sourcepub fn builder() -> InteractionComponentBuilder<'static>
pub fn builder() -> InteractionComponentBuilder<'static>
Return an InteractionComponent Builder.
Sourcepub fn description(&self, tag: &MyLanguageTag) -> Option<&str>
pub fn description(&self, tag: &MyLanguageTag) -> Option<&str>
Return description (e.g. the text for a given choice in a multiple-
choice interaction) in the designated language tag if it exists;
None otherwise.
Trait Implementations§
Source§impl Canonical for InteractionComponent
impl Canonical for InteractionComponent
Source§fn canonicalize(&mut self, tags: &[MyLanguageTag])
fn canonicalize(&mut self, tags: &[MyLanguageTag])
Reduce
self to conform to its canonical format as defined in xAPI
keeping the most appropriate entry given a list of preferred language
tags.Source§impl Clone for InteractionComponent
impl Clone for InteractionComponent
Source§fn clone(&self) -> InteractionComponent
fn clone(&self) -> InteractionComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractionComponent
impl Debug for InteractionComponent
Source§impl<'de> Deserialize<'de> for InteractionComponent
impl<'de> Deserialize<'de> for InteractionComponent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for InteractionComponent
impl Display for InteractionComponent
Source§impl PartialEq for InteractionComponent
impl PartialEq for InteractionComponent
Source§fn eq(&self, other: &InteractionComponent) -> bool
fn eq(&self, other: &InteractionComponent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InteractionComponent
impl Serialize for InteractionComponent
Source§impl Validate for InteractionComponent
impl Validate for InteractionComponent
Source§fn validate(&self) -> Vec<ValidationError>
fn validate(&self) -> Vec<ValidationError>
Validate the instance and return a potentially empty collection of
ValidationError.
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Convenience method to quickly assert if the type implementing this
trait is indeed valid. Read more
Source§fn check_validity(&self) -> Result<(), ValidationError>
fn check_validity(&self) -> Result<(), ValidationError>
Convenience method that checks the validity of a Validate instance and
raises a ValidationError if it was found to be invalid.
impl StructuralPartialEq for InteractionComponent
Auto Trait Implementations§
impl Freeze for InteractionComponent
impl RefUnwindSafe for InteractionComponent
impl Send for InteractionComponent
impl Sync for InteractionComponent
impl Unpin for InteractionComponent
impl UnsafeUnpin for InteractionComponent
impl UnwindSafe for InteractionComponent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.