pub struct ExerciseProgress {
pub exercise_id: Uuid,
pub score_given: f32,
pub score_maximum: i32,
pub completed: bool,
pub attempted: bool,
}Expand description
The current user’s progress on a single exercise.
A client derives a boolean “passed” from these fields. The authoritative signal is
completed (the exercise reached the Completed activity stage). A client that
instead treats “full points” as passing can use score_given >= score_maximum when
score_maximum > 0.
Fields§
§exercise_id: Uuid§score_given: f32Points the user has been awarded, 0.0 when the user has no state for the exercise.
score_maximum: i32The maximum points obtainable from the exercise.
completed: booltrue once the exercise has reached the Completed activity stage. The primary
“passed” signal.
attempted: booltrue once the user has started or submitted the exercise (any activity stage past
the initial one), regardless of whether it is completed.
Trait Implementations§
Source§impl ComposeSchema for ExerciseProgress
impl ComposeSchema for ExerciseProgress
Source§impl Debug for ExerciseProgress
impl Debug for ExerciseProgress
Source§impl<'de> Deserialize<'de> for ExerciseProgress
impl<'de> Deserialize<'de> for ExerciseProgress
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 Serialize for ExerciseProgress
impl Serialize for ExerciseProgress
Auto Trait Implementations§
impl Freeze for ExerciseProgress
impl RefUnwindSafe for ExerciseProgress
impl Send for ExerciseProgress
impl Sync for ExerciseProgress
impl Unpin for ExerciseProgress
impl UnsafeUnpin for ExerciseProgress
impl UnwindSafe for ExerciseProgress
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more