Struct umm::grade::DocsGrader
source · pub struct DocsGrader {
pub project: Project,
pub files: Array,
pub out_of: f64,
pub req_name: String,
pub penalty: f64,
}
Expand description
A struct representing arguments to grade_docs function
Fields§
§project: Project
project
: the project to grade
files: Array
files
: the files to grade
out_of: f64
out_of
: the total points for the requirement
req_name: String
req_name
: the name of the requirement
penalty: f64
penalty
: the penalty to apply for each instance of a violation. Optional, default is 3
Implementations§
source§impl DocsGrader
impl DocsGrader
sourcepub fn set_project(self, project: Project) -> Self
pub fn set_project(self, project: Project) -> Self
Setter for project
sourcepub fn set_out_of(self, out_of: f64) -> Self
pub fn set_out_of(self, out_of: f64) -> Self
Setter for out_of
sourcepub fn set_req_name(self, req_name: String) -> Self
pub fn set_req_name(self, req_name: String) -> Self
Setter for req_name
sourcepub fn set_penalty(self, penalty: f64) -> Self
pub fn set_penalty(self, penalty: f64) -> Self
Setter for penalty
sourcepub fn grade_docs(self) -> Result<GradeResult>
pub fn grade_docs(self) -> Result<GradeResult>
Grades documentation by using the -Xdoclint javac flag. Scans javac output for generated warnings and grades accordingly.
sourcepub fn grade_docs_script(self) -> Result<GradeResult, Box<EvalAltResult>>
pub fn grade_docs_script(self) -> Result<GradeResult, Box<EvalAltResult>>
Macro generated variant of #fn_name that returns EvalAltResult. This allows the function to be used in scripts.
Trait Implementations§
source§impl Clone for DocsGrader
impl Clone for DocsGrader
source§fn clone(&self) -> DocsGrader
fn clone(&self) -> DocsGrader
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 CustomType for DocsGrader
impl CustomType for DocsGrader
Allows registering custom types with Rhai
source§impl Default for DocsGrader
impl Default for DocsGrader
source§fn default() -> DocsGrader
fn default() -> DocsGrader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DocsGrader
impl Send for DocsGrader
impl Sync for DocsGrader
impl Unpin for DocsGrader
impl !UnwindSafe for DocsGrader
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