pub struct ScoreExplanation {
pub score: ScoreDto,
pub constraint_matches: Vec<ConstraintMatch>,
pub indictments: Vec<Indictment>,
}Fields§
§score: ScoreDto§constraint_matches: Vec<ConstraintMatch>§indictments: Vec<Indictment>Implementations§
Source§impl ScoreExplanation
impl ScoreExplanation
pub fn new(score: ScoreDto) -> Self
pub fn with_constraint_match(self, constraint_match: ConstraintMatch) -> Self
pub fn with_indictment(self, indictment: Indictment) -> Self
pub fn is_feasible(&self) -> bool
pub fn constraint_count(&self) -> usize
pub fn get_constraint_matches_by_name( &self, name: &str, ) -> Vec<&ConstraintMatch>
pub fn get_indictment_for_object( &self, object: ObjectHandle, ) -> Option<&Indictment>
pub fn hard_score(&self) -> i64
pub fn soft_score(&self) -> i64
pub fn medium_score(&self) -> Option<i64>
Trait Implementations§
Source§impl Clone for ScoreExplanation
impl Clone for ScoreExplanation
Source§fn clone(&self) -> ScoreExplanation
fn clone(&self) -> ScoreExplanation
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScoreExplanation
impl Debug for ScoreExplanation
Source§impl<'de> Deserialize<'de> for ScoreExplanation
impl<'de> Deserialize<'de> for ScoreExplanation
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 PartialEq for ScoreExplanation
impl PartialEq for ScoreExplanation
Source§impl Serialize for ScoreExplanation
impl Serialize for ScoreExplanation
impl StructuralPartialEq for ScoreExplanation
Auto Trait Implementations§
impl Freeze for ScoreExplanation
impl RefUnwindSafe for ScoreExplanation
impl Send for ScoreExplanation
impl Sync for ScoreExplanation
impl Unpin for ScoreExplanation
impl UnwindSafe for ScoreExplanation
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)