pub struct Score { /* private fields */ }Implementations§
Source§impl Score
impl Score
Sourcepub fn builder() -> ScoreBuilder
pub fn builder() -> ScoreBuilder
Return a Score Builder.
Sourcepub fn scaled(&self) -> Option<f32>
pub fn scaled(&self) -> Option<f32>
Return the score related to the experience as modified by scaling and/or normalization.
Valid values are expected to be w/in [-1.0 .. +1.0] range.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Score
xAPI mandates few constraints on the values of a Score properties such
as:
impl<'de> Deserialize<'de> for Score
xAPI mandates few constraints on the values of a Score properties such as:
scaledmust be w/in the range [-1.0 .. +1.0 ].minmust be less thanmax.rawmust be w/in the range [min..max].
We make sure these rules are respected while parsing the JSON stream and abort the process if they’re not.
Source§fn deserialize<D>(des: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(des: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Fingerprint for Score
impl Fingerprint for Score
Source§impl Validate for Score
impl Validate for Score
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 Score
Auto Trait Implementations§
impl Freeze for Score
impl RefUnwindSafe for Score
impl Send for Score
impl Sync for Score
impl Unpin for Score
impl UnsafeUnpin for Score
impl UnwindSafe for Score
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.