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)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::EmissionGuarantee;

/// Trait implemented by error types. This should not be implemented manually. Instead, use
/// `#[derive(Subdiagnostic)]` -- see [rustc_macros::Subdiagnostic].
#[rustc_diagnostic_item = "Subdiagnostic"]
pub trait Subdiagnostic
where
	Self: Sized,
{
	/// Add a subdiagnostic to an existing diagnostic.
	fn add_to_diag<GUARANTEE: EmissionGuarantee>(
		self,
		diag: &mut Diag<'_, GUARANTEE>,
	);
}