daemonic_error 0.1.2

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::Timestamp;
pub(crate) use crate::{daemonic::glass::Glass, daemonic::{
	glass::{
		Temporal,
		Consistency,
		Accessibility,
		Annotation,
		Severity,
		Assessment,
	}
}};
use crate::daemonic::{SpatialAnchor, TopologySegment};
use crate::DaemonicClock;

// pub(crate) mod debug;

// pub mod display;

pub(crate) mod error;

pub(crate) mod observable;

pub(crate) mod observer;

/// DaemonicObservation — the event/product of observation.
///
/// What happened when an observer looked at an observable
/// through a glass. This is the photograph, not the camera.
///
/// DaemonicObservation implements glass<T> because it IS a glass
/// reflection. The observation is what came through the glass.
///
/// Carries: what was observed (payload), the fidelity of
/// the observation (severity + axes), where it happened
/// (position), when it happened (timestamp), and who
/// observed it (observer_position).
pub(crate) struct DaemonicObservation<'lattice_position, GLASS>
	where
		GLASS: Glass<GLASS>,
{
	/// What came through the glass
	payload: Option<GLASS>,

	/// Primary fidelity axis
	severity: Severity,

	/// Annotation on this observation
	annotation: Annotation,

	/// Temporal relationship to current frame
	temporal: Temporal,

	/// Can the observer see through?
	accessibility: Accessibility,

	/// One observation or contradictory multiples?
	consistency: Consistency,

	/// Has fidelity been assessed?
	assessment: Assessment,

	/// Where in the lattice this observation occurred
	/// IE, where is the observed object (not self) live in the Trait tree Relative to
	/// Daemonic trait as relative Root node?
	position: &'lattice_position dyn SpatialAnchor,

	/// When this observation occurred (clock tick)
	/// This might need a method set at some point to determine which [DaemonicClock] it
	/// came from before writing down.
	timestamp: Timestamp,

	/// Who observed (observer's position, not the observer itself
	/// to avoid circular reference)
	/// Observer Position should be anchored to the Daemonic Tree with **Daemonic** as the
	/// **relative Root**.
	/// This is a relativistic system and respects that, there are no privileged
	/// or absolute reference frames. All are considered meaningful from that frames point
	/// of view. No other frame can supersede it in shared context, Else **DIES IN TRANSIT**
	///
	/// Ideally this line should never panic when methods are invoked, so double check sanitizing
	/// methods and shit Meph.
	observer_position: TopologySegment,
}