pub struct CompletionBuilder {
user_id: Uuid,
email: Option<String>,
grade: Option<i32>,
passed: Option<bool>,
completion_date: Option<DateTime<Utc>>,
completion_language: Option<String>,
eligible_for_ects: Option<bool>,
prerequisite_modules_completed: Option<bool>,
needs_to_be_reviewed: Option<bool>,
register: Option<CompletionRegisteredBuilder>,
}Expand description
Builder for seeding a single course_module_completion row.
Fields§
§user_id: Uuid§email: Option<String>§grade: Option<i32>§passed: Option<bool>§completion_date: Option<DateTime<Utc>>§completion_language: Option<String>§eligible_for_ects: Option<bool>§prerequisite_modules_completed: Option<bool>§needs_to_be_reviewed: Option<bool>§register: Option<CompletionRegisteredBuilder>Implementations§
Source§impl CompletionBuilder
impl CompletionBuilder
pub fn new(user_id: Uuid) -> Self
pub fn registered(self, r: CompletionRegisteredBuilder) -> Self
pub fn email(self, v: impl Into<String>) -> Self
pub fn grade(self, v: i32) -> Self
pub fn passed(self, v: bool) -> Self
pub fn completion_date(self, v: DateTime<Utc>) -> Self
pub fn completion_language(self, v: impl Into<String>) -> Self
pub fn eligible_for_ects(self, v: bool) -> Self
pub fn prerequisite_modules_completed(self, v: bool) -> Self
pub fn needs_to_be_reviewed(self, v: bool) -> Self
pub async fn seed( &self, conn: &mut PgConnection, course_id: Uuid, course_module_id: Uuid, default_registrar_id: Option<Uuid>, ) -> Result<()>
Trait Implementations§
Source§impl Clone for CompletionBuilder
impl Clone for CompletionBuilder
Source§fn clone(&self) -> CompletionBuilder
fn clone(&self) -> CompletionBuilder
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for CompletionBuilder
impl RefUnwindSafe for CompletionBuilder
impl Send for CompletionBuilder
impl Sync for CompletionBuilder
impl Unpin for CompletionBuilder
impl UnwindSafe for CompletionBuilder
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