///|
/// The JSON value category used by structured lens diagnostics.
pub enum JsonKind {
Null
Boolean
Number
String
Array
Object
} derive(Eq, Debug)
///|
/// A machine-readable reason why a lens or validation check failed.
pub enum IssueCode {
MissingProperty
TypeMismatch(expected~ : JsonKind, actual~ : JsonKind)
IndexOutOfBounds(index~ : Int, length~ : Int)
ConstraintViolation(code~ : String)
ExternalDecode
} derive(Eq, Debug)
///|
/// A structured diagnostic containing the exact pointer and failure reason.
pub struct Issue {
pointer : Pointer
code : IssueCode
message : String?
} derive(Eq, Debug)
///|
/// The typed error raised when a lens cannot read its selected value.
pub suberror LensError {
LensError(Issue)
} derive(Eq, Debug)