pub struct RubricAssignment {
pub criterion_scores: HashMap<String, CriterionScoreData>,
pub total: f64,
pub rubric_ref: Option<String>,
pub summary: Option<String>,
pub all_required_passed: Option<bool>,
pub normalized_total: Option<f64>,
}Expand description
Assignment of scores to a rubric’s criteria.
Fields§
§criterion_scores: HashMap<String, CriterionScoreData>Map of criterion ID to score data.
total: f64Aggregated total score.
rubric_ref: Option<String>Reference to the rubric used.
summary: Option<String>Summary of the evaluation.
all_required_passed: Option<bool>Whether all required criteria passed.
normalized_total: Option<f64>Normalized total (0-1 range).
Implementations§
Source§impl RubricAssignment
impl RubricAssignment
Sourcepub fn new() -> RubricAssignment
pub fn new() -> RubricAssignment
Create a new rubric assignment.
Sourcepub fn with_score(
self,
criterion_id: impl Into<String>,
score: CriterionScoreData,
) -> RubricAssignment
pub fn with_score( self, criterion_id: impl Into<String>, score: CriterionScoreData, ) -> RubricAssignment
Add a criterion score.
Sourcepub fn with_total(self, total: f64) -> RubricAssignment
pub fn with_total(self, total: f64) -> RubricAssignment
Set the total score.
Sourcepub fn with_rubric_ref(self, rubric_ref: impl Into<String>) -> RubricAssignment
pub fn with_rubric_ref(self, rubric_ref: impl Into<String>) -> RubricAssignment
Set the rubric reference.
Sourcepub fn with_summary(self, summary: impl Into<String>) -> RubricAssignment
pub fn with_summary(self, summary: impl Into<String>) -> RubricAssignment
Set the summary.
Sourcepub fn calculate_weighted_total(&mut self)
pub fn calculate_weighted_total(&mut self)
Calculate total from criterion scores using weighted sum.
Trait Implementations§
Source§impl Clone for RubricAssignment
impl Clone for RubricAssignment
Source§fn clone(&self) -> RubricAssignment
fn clone(&self) -> RubricAssignment
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 moreSource§impl Debug for RubricAssignment
impl Debug for RubricAssignment
Source§impl Default for RubricAssignment
impl Default for RubricAssignment
Source§fn default() -> RubricAssignment
fn default() -> RubricAssignment
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RubricAssignment
impl<'de> Deserialize<'de> for RubricAssignment
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RubricAssignment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RubricAssignment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RubricAssignment
impl Serialize for RubricAssignment
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RubricAssignment
impl RefUnwindSafe for RubricAssignment
impl Send for RubricAssignment
impl Sync for RubricAssignment
impl Unpin for RubricAssignment
impl UnwindSafe for RubricAssignment
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request