pub struct XResult { /* private fields */ }Expand description
Structure capturing a quantifiable xAPI outcome.
Implementations§
Source§impl XResult
impl XResult
Sourcepub fn builder() -> XResultBuilder
pub fn builder() -> XResultBuilder
Return an XResult Builder.
Sourcepub fn score(&self) -> Option<&Score>
pub fn score(&self) -> Option<&Score>
When set, defines the score of the participant in relation to the success or quality of an experience.
Sourcepub fn success(&self) -> Option<bool>
pub fn success(&self) -> Option<bool>
When set, defines the success or not of the participant in relation to an experience.
Sourcepub fn completion(&self) -> Option<bool>
pub fn completion(&self) -> Option<bool>
When set, defines a participant’s completion or not of an experience.
Sourcepub fn response(&self) -> Option<&str>
pub fn response(&self) -> Option<&str>
When set, defines a participant’s response to an interaction.
Sourcepub fn duration(&self) -> Option<&MyDuration>
pub fn duration(&self) -> Option<&MyDuration>
When set, defines a participant’s period of time during which the interaction occurred.
Sourcepub fn duration_to_iso8601(&self) -> Option<String>
pub fn duration_to_iso8601(&self) -> Option<String>
Return duration truncated and in ISO8601 format; i.e. “P9DT9H9M9.99S”
Sourcepub fn extensions(&self) -> Option<&Extensions>
pub fn extensions(&self) -> Option<&Extensions>
When set, defines a collection of additional free-form key/value properties associated w/ this Result.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for XResult
impl<'de> Deserialize<'de> for XResult
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 Fingerprint for XResult
impl Fingerprint for XResult
Source§impl Validate for XResult
impl Validate for XResult
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 XResult
Auto Trait Implementations§
impl Freeze for XResult
impl RefUnwindSafe for XResult
impl Send for XResult
impl Sync for XResult
impl Unpin for XResult
impl UnsafeUnpin for XResult
impl UnwindSafe for XResult
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.