Struct umm::grade::GradeResult

source ·
pub struct GradeResult {
    requirement: String,
    grade: Grade,
    reason: String,
    prompt: Option<Vec<ChatCompletionRequestMessage>>,
}
Expand description

A struct to store grading results and display them

Fields§

§requirement: String
  • requirement: refers to Requirement ID
§grade: Grade
  • grade: grade received for above Requirement
§reason: String
  • reason: the reason for penalties applied, if any
§prompt: Option<Vec<ChatCompletionRequestMessage>>
  • prompt: the prompt for the AI TA

Implementations§

source§

impl GradeResult

source

pub fn requirement(&mut self) -> String

a getter for Requirement

source

pub fn set_requirement(self, requirement: String) -> Self

a setter for Requirement

source

pub fn reason(&mut self) -> String

a getter for Reason

source

pub fn set_reason(self, reason: String) -> Self

a setter for Reason

source

pub fn grade(&mut self) -> f64

a getter for the self.grade.grade

source

pub fn out_of(&mut self) -> f64

a getter for the self.grade.out_of

source

pub fn set_grade(self, grade: f64) -> Self

a setter for the self.grade.grade

source

pub fn set_out_of(self, out_of: f64) -> Self

a setter for the self.grade.out_of

source

pub fn prompt(&mut self) -> Option<Vec<ChatCompletionRequestMessage>>

a getter for the prompt

source

pub fn set_prompt( self, prompt: Option<Vec<ChatCompletionRequestMessage>> ) -> Self

a setter for the prompt

Trait Implementations§

source§

impl Clone for GradeResult

source§

fn clone(&self) -> GradeResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CustomType for GradeResult

Allows registering custom types with Rhai.

source§

fn build(builder: TypeBuilder<'_, Self>)

Builds the custom type for use with the [Engine]. Read more
source§

impl Default for GradeResult

source§

fn default() -> GradeResult

Returns the “default value” for a type. Read more
source§

impl Tabled for GradeResult

source§

const LENGTH: usize = 3usize

A length of fields and headers, which must be the same.
source§

fn fields(&self) -> Vec<Cow<'_, str>>

Fields method must return a list of cells. Read more
source§

fn headers() -> Vec<Cow<'static, str>>

Headers must return a list of column names.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<U, <U as TryFrom<T>>::Error>> + 'async_trait>>
where T: 'async_trait,

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more