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;

/// Faithful but uninterpretable by current observer.
/// Information exists behind the glass but can't be seen through.
/// The Black glass protocol's external face.
pub trait GlassOpaque: Glass<()> + for<'error> DaemonicError<'error> {
	/// Why can't the observer see through?
	fn opacity_reason(&self) -> &str;

	/// What type of observer COULD see through?
	fn required_capability(&self) -> Option<&str> {
		None
	}
}
/// Annotation on an Opaque observation.
/// "You can't see through, but someone who can left you a note."
pub trait OpaqueAnnotation: GlassOpaque {
	fn annotation(&self) -> &str;

	/// Description from an observer who COULD see through.
	/// This is the note slipped under the Black glass.
	fn insider_description(&self) -> Option<&str> { None }
}