pub struct Diagnostic {
pub code: DiagCode,
pub span: Span,
pub message: String,
pub suggested_fix: Option<String>,
pub evidential: Option<(f32, f32)>,
}Fields§
§code: DiagCode§span: Span§message: String§suggested_fix: Option<String>Safe rewrite hint. MUST NOT grant new authority (core §9).
evidential: Option<(f32, f32)>Evidential (μ, λ) annotation: degrees of positive belief and refutation (G9).
Implementations§
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn new(code: DiagCode, span: Span, message: impl Into<String>) -> Self
pub fn new(code: DiagCode, span: Span, message: impl Into<String>) -> Self
Creates a new Diagnostic.
Sourcepub fn disclosure_denied(span: Span, capability: &str, reason: &str) -> Self
pub fn disclosure_denied(span: Span, capability: &str, reason: &str) -> Self
Create a disclosure-denied diagnostic (R10).
Sourcepub fn with_evidential(self, mu: f32, lambda: f32) -> Self
pub fn with_evidential(self, mu: f32, lambda: f32) -> Self
Set the evidential (μ, λ) annotation: degrees of positive belief and refutation.
Sourcepub fn civics_code(&self) -> &'static str
pub fn civics_code(&self) -> &'static str
Civics surface code (UE-062).
Vibe keeps internal E300 (capability / lease). Civics docs and UI map
lease failures to E0403. Other codes pass through as their Vibe token.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl Display for Diagnostic
impl Display for Diagnostic
Source§impl Error for Diagnostic
impl Error for Diagnostic
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Diagnostic> for VmError
impl From<Diagnostic> for VmError
Source§fn from(d: Diagnostic) -> Self
fn from(d: Diagnostic) -> Self
Converts to this type from the input type.
Source§impl From<Diagnostic> for ReactiveCellError
impl From<Diagnostic> for ReactiveCellError
Source§fn from(diag: Diagnostic) -> Self
fn from(diag: Diagnostic) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl StructuralPartialEq for Diagnostic
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