daemonic_error 0.1.0

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)
use crate::daemonic::glass::Glass;
use crate::DaemonicError;

/// Temporally displaced observation.
/// Data may be perfect but it's from a different time.
/// The reflection arrived late.
pub trait GlassEcho<GLASS>: Glass<GLASS> + for<'error> DaemonicError<'error> {
	/// When was this observation originally made?
	fn original_tick(&self) -> u64;

	/// How stale is it relative to current frame?
	fn staleness(&self) -> u64;
}
/// Annotation on an Echo observation.
/// "This is from the past, here's the original context."
pub trait EchoAnnotation<GLASS>: GlassEcho<GLASS> {
	fn annotation(&self) -> &str;

	/// What was the context when this was originally observed?
	fn original_context(&self) -> Option<&str> { None }
}