pub struct CertificateAllRequirements {
pub certificate_configuration_id: Uuid,
pub course_module_ids: Vec<Uuid>,
pub course_instance_ids: Vec<Uuid>,
}
Fields§
§certificate_configuration_id: Uuid
§course_module_ids: Vec<Uuid>
§course_instance_ids: Vec<Uuid>
Implementations§
Source§impl CertificateAllRequirements
impl CertificateAllRequirements
Sourcepub fn is_default_certificate_configuration(&self) -> bool
pub fn is_default_certificate_configuration(&self) -> bool
A certificate configuration is a default configuration if the requirement is only for one course module and for one course instance. These types of configurations are regarded as the default because they are the most commonly used ones.
pub fn requires_only_one_course_module_and_does_not_require_course_instance( &self, ) -> bool
Sourcepub async fn has_user_completed_all_requirements(
&self,
conn: &mut PgConnection,
user_id: Uuid,
) -> ModelResult<bool>
pub async fn has_user_completed_all_requirements( &self, conn: &mut PgConnection, user_id: Uuid, ) -> ModelResult<bool>
Checks if the user has completed all requirements to be eligible for a certificate.
Trait Implementations§
Source§impl Clone for CertificateAllRequirements
impl Clone for CertificateAllRequirements
Source§fn clone(&self) -> CertificateAllRequirements
fn clone(&self) -> CertificateAllRequirements
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 Debug for CertificateAllRequirements
impl Debug for CertificateAllRequirements
Source§impl<'de> Deserialize<'de> for CertificateAllRequirements
impl<'de> Deserialize<'de> for CertificateAllRequirements
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
impl StructuralPartialEq for CertificateAllRequirements
Auto Trait Implementations§
impl Freeze for CertificateAllRequirements
impl RefUnwindSafe for CertificateAllRequirements
impl Send for CertificateAllRequirements
impl Sync for CertificateAllRequirements
impl Unpin for CertificateAllRequirements
impl UnwindSafe for CertificateAllRequirements
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