pub struct XResultBuilder { /* private fields */ }Expand description
A Type that knows how to construct an xAPI Result.
Implementations§
Source§impl XResultBuilder
impl XResultBuilder
Sourcepub fn score(self, val: Score) -> Result<Self, DataError>
pub fn score(self, val: Score) -> Result<Self, DataError>
Set the score field.
Raise DataError if the argument is invalid.
Sourcepub fn completion(self, val: bool) -> Self
pub fn completion(self, val: bool) -> Self
Set the completion flag.
Sourcepub fn response(self, val: &str) -> Result<Self, DataError>
pub fn response(self, val: &str) -> Result<Self, DataError>
Set the response field.
Raise DataError if the input string is empty.
Sourcepub fn duration(self, val: &str) -> Result<Self, DataError>
pub fn duration(self, val: &str) -> Result<Self, DataError>
Set the duration field.
Raise DataError if the input string is empty.
Sourcepub fn with_extensions(self, map: Extensions) -> Result<Self, DataError>
pub fn with_extensions(self, map: Extensions) -> Result<Self, DataError>
Set (as in replace) the extensions property of this instance w/ the
given argument.
Trait Implementations§
Source§impl Debug for XResultBuilder
impl Debug for XResultBuilder
Source§impl Default for XResultBuilder
impl Default for XResultBuilder
Source§fn default() -> XResultBuilder
fn default() -> XResultBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for XResultBuilder
impl RefUnwindSafe for XResultBuilder
impl Send for XResultBuilder
impl Sync for XResultBuilder
impl Unpin for XResultBuilder
impl UnsafeUnpin for XResultBuilder
impl UnwindSafe for XResultBuilder
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