Errors that compose, predict, and leave receipts - Compose: algebraic combination (in active development) - Predict: Glass/Severity - Receipts: audit trail, position, checksum
- Reflection: Runtime Reflection through TopologySegment (in active development)
usecrate::Observation;usesuper::Glass;/// Clear glass. Payload guaranteed. Passthrough.
////// Types implementing GlassStable are making a compile-time
/// promise: there IS a value here. Not Option. Not maybe.
/// The transition succeeded fully.
pubtraitGlassStable<GLASS>: Glass<GLASS>
where
Self: Sized,
{/// Guaranteed value extraction. Not Option.
/// This is the Stable contract.
fnvalue(&self)->Observation<&GLASS>;/// Consume and extract. Guaranteed.
fninto_value(self)->Observation<GLASS>whereSelf: Sized;
}
/// Annotation on a Stable observation.
/// "Everything's fine, and also here's something you should know."
pub trait StableAnnotation<GLASS>:GlassStable<GLASS>whereSelf: Sized,
GLASS:for<'str>Glass<&'strstr>{fnannotation(&self)->&GLASS;/// Stable annotations can optionally suggest a better path
/// even though the current one succeeded.
fnalternative(&self)->Option<&GLASS>{None}}