pub struct Diagnostic {
pub kind: DiagnosticKind,
pub message: String,
pub data: Value,
}Expand description
Diagnostic information from solver
Fields§
§kind: DiagnosticKindDiagnostic type
message: StringHuman-readable message
data: ValueAdditional data
Implementations§
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn new(kind: DiagnosticKind, message: impl Into<String>) -> Self
pub fn new(kind: DiagnosticKind, message: impl Into<String>) -> Self
Create a generic diagnostic
Sourcepub fn with_data(
kind: DiagnosticKind,
message: impl Into<String>,
data: Value,
) -> Self
pub fn with_data( kind: DiagnosticKind, message: impl Into<String>, data: Value, ) -> Self
Create a generic diagnostic with data
Sourcepub fn scoring_breakdown(breakdown: Value) -> Self
pub fn scoring_breakdown(breakdown: Value) -> Self
Create a scoring breakdown diagnostic
Sourcepub fn tie_break_rationale(
message: impl Into<String>,
candidates: Vec<String>,
) -> Self
pub fn tie_break_rationale( message: impl Into<String>, candidates: Vec<String>, ) -> Self
Create a tie-break rationale diagnostic
Sourcepub fn pruning(message: impl Into<String>, pruned_count: usize) -> Self
pub fn pruning(message: impl Into<String>, pruned_count: usize) -> Self
Create a pruning diagnostic
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
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 Diagnostic
impl Debug for Diagnostic
Source§impl<'de> Deserialize<'de> for Diagnostic
impl<'de> Deserialize<'de> for Diagnostic
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
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
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