daemonic_error 0.1.1

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::SemanticAnchor;
use crate::daemonic::frame::{Frame, FrameType, ReferenceFrame};
use crate::daemonic::glass::{Glass, Observation};
use crate::daemonic::{Anchor, AnchorDomainSet,
                      // Anchorable,
                      SymbolicAnchor, TopologySegment};
use daemonic::*;
use generic::*;

#[cfg(feature = "Libc")]
pub enum Error {
	/// Use generic variant for simple or quick errors
	Generic(GenericError),
	
	/// Use this variant for LIBC compatible errors with ERRNO table and conversion methods
	OS(crate::daemonic::glass::error::os::OsError),
	/// Daemonic Error variants with richer context than Generic or OS level returns
	/// Shade, Entity, and Symbolic errors are here.
	Daemonic(Daemonic),
}

impl Frame for Error {
	fn frame_type(&self) -> FrameType {
		todo!()
	}
}


impl Anchor for Error {
	fn anchor_domains(&self) -> AnchorDomainSet {
		todo!()
	}
}

impl ReferenceFrame for Error {
	fn origin(&self) -> &TopologySegment {
		todo!()
	}
	
	fn transform_to<GLASS>(&self, observation: &impl Glass<GLASS>, target_frame: &dyn ReferenceFrame) -> Option<Observation<GLASS>>
		where
			GLASS: Clone,
			Self: Sized
	{
		todo!()
	}
}
#[cfg(not(feature = "Libc", ))]
pub enum Error {
	/// Use generic variant for simple or quick errors
	Generic(GenericError),
	
	/// Daemonic Error variants with richer context than Generic or OS level returns
	/// Shade, Entity, and Symbolic errors are here.
	Daemonic(Daemonic),
}

#[cfg(feature = "Libc")]
pub(crate) mod os;
pub(crate) mod daemonic;
pub(crate) mod generic;
pub(crate) mod physics_violation;