pub struct CourseModule {Show 14 fields
pub id: Uuid,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub deleted_at: Option<DateTime<Utc>>,
pub name: Option<String>,
pub course_id: Uuid,
pub order_number: i32,
pub copied_from: Option<Uuid>,
pub uh_course_code: Option<String>,
pub completion_policy: CompletionPolicy,
pub completion_registration_link_override: Option<String>,
pub ects_credits: Option<f32>,
pub enable_registering_completion_to_uh_open_university: bool,
pub certification_enabled: bool,
}
Expand description
Based on CourseModulesSchema but completion_policy parsed and addded (and some not needeed fields removed).
Fields§
§id: Uuid
§created_at: DateTime<Utc>
§updated_at: DateTime<Utc>
§deleted_at: Option<DateTime<Utc>>
§name: Option<String>
§course_id: Uuid
§order_number: i32
§copied_from: Option<Uuid>
§uh_course_code: Option<String>
§completion_policy: CompletionPolicy
§completion_registration_link_override: Option<String>
If set, use this link rather than the default one when registering course completions.
ects_credits: Option<f32>
§enable_registering_completion_to_uh_open_university: bool
§certification_enabled: bool
Implementations§
Source§impl CourseModule
impl CourseModule
pub fn new(id: Uuid, course_id: Uuid) -> Self
pub fn set_timestamps( self, created_at: DateTime<Utc>, updated_at: DateTime<Utc>, deleted_at: Option<DateTime<Utc>>, ) -> Self
Sourcepub fn set_name_and_order_number(
self,
name: Option<String>,
order_number: i32,
) -> Self
pub fn set_name_and_order_number( self, name: Option<String>, order_number: i32, ) -> Self
order_number == 0 in and only if name == None
pub fn set_completion_policy(self, completion_policy: CompletionPolicy) -> Self
pub fn set_registration_info( self, uh_course_code: Option<String>, ects_credits: Option<f32>, completion_registration_link_override: Option<String>, enable_registering_completion_to_uh_open_university: bool, ) -> Self
pub fn set_certification_enabled(self, certification_enabled: bool) -> Self
pub fn is_default_module(&self) -> bool
Trait Implementations§
Source§impl Clone for CourseModule
impl Clone for CourseModule
Source§fn clone(&self) -> CourseModule
fn clone(&self) -> CourseModule
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 CourseModule
impl Debug for CourseModule
Source§impl<'de> Deserialize<'de> for CourseModule
impl<'de> Deserialize<'de> for CourseModule
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 From<CourseModulesSchema> for CourseModule
impl From<CourseModulesSchema> for CourseModule
Source§fn from(schema: CourseModulesSchema) -> Self
fn from(schema: CourseModulesSchema) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CourseModule
impl PartialEq for CourseModule
Source§impl Serialize for CourseModule
impl Serialize for CourseModule
impl StructuralPartialEq for CourseModule
Auto Trait Implementations§
impl Freeze for CourseModule
impl RefUnwindSafe for CourseModule
impl Send for CourseModule
impl Sync for CourseModule
impl Unpin for CourseModule
impl UnwindSafe for CourseModule
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