pub struct AutomaticCompletionRequirements {
pub course_module_id: Uuid,
pub number_of_exercises_attempted_treshold: Option<i32>,
pub number_of_points_treshold: Option<i32>,
pub requires_exam: bool,
}
Fields§
§course_module_id: Uuid
Course module associated with these requirements.
number_of_exercises_attempted_treshold: Option<i32>
§number_of_points_treshold: Option<i32>
§requires_exam: bool
Implementations§
Source§impl AutomaticCompletionRequirements
impl AutomaticCompletionRequirements
Sourcepub fn passes_exercise_tresholds(
&self,
exercises_attempted: i32,
exercise_points: i32,
) -> bool
pub fn passes_exercise_tresholds( &self, exercises_attempted: i32, exercise_points: i32, ) -> bool
Shorthand for checking whether the given exercise related values pass their respective tresholds.
Sourcepub fn passes_number_of_exercises_attempted_treshold(
&self,
exercises_attempted: i32,
) -> bool
pub fn passes_number_of_exercises_attempted_treshold( &self, exercises_attempted: i32, ) -> bool
Whether the given number is higher than the exercises attempted treshold. Always returns true if there is no treshold.
Sourcepub fn passes_number_of_exercise_points_treshold(
&self,
exercise_points: i32,
) -> bool
pub fn passes_number_of_exercise_points_treshold( &self, exercise_points: i32, ) -> bool
Whether the given number is higher than the exercise points treshold. Always returns true if there is no treshold.
Trait Implementations§
Source§impl Clone for AutomaticCompletionRequirements
impl Clone for AutomaticCompletionRequirements
Source§fn clone(&self) -> AutomaticCompletionRequirements
fn clone(&self) -> AutomaticCompletionRequirements
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for AutomaticCompletionRequirements
impl<'de> Deserialize<'de> for AutomaticCompletionRequirements
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 PartialEq for AutomaticCompletionRequirements
impl PartialEq for AutomaticCompletionRequirements
Source§fn eq(&self, other: &AutomaticCompletionRequirements) -> bool
fn eq(&self, other: &AutomaticCompletionRequirements) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for AutomaticCompletionRequirements
Auto Trait Implementations§
impl Freeze for AutomaticCompletionRequirements
impl RefUnwindSafe for AutomaticCompletionRequirements
impl Send for AutomaticCompletionRequirements
impl Sync for AutomaticCompletionRequirements
impl Unpin for AutomaticCompletionRequirements
impl UnwindSafe for AutomaticCompletionRequirements
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> 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