Public declaration syntax from forge-rs/crates/forge-telemetry/src/error.rs Original source SHA-256: 47cca4c817edbb919b51893fbdc6152cdb3c4091d9cf4aac95b6cc5d93428fc0 Function bodies and constant values are omitted. This is not the complete implementation. Source line 28 #[derive(Debug, Error)] pub enum TelemetryError { /// A span with the given ID was not found in the collector. #[error("span '{span_id}' not found in telemetry collector")] SpanNotFound { /// The span ID that was not found. span_id: String, }, /// An attempt was made to close a span that is already closed. #[error("span '{span_id}' has already been closed and cannot be ended again")] SpanAlreadyClosed { /// The span ID that was already closed. span_id: String, }, /// An audit entry failed validation. #[error("audit entry is invalid: {reason}")] AuditEntryInvalid { /// The reason the entry is invalid. reason: String, }, /// The audit trail integrity check failed at the given index. #[error("audit trail corrupted at index {index}: {reason}")] AuditTrailCorrupted { /// The index where corruption was detected. index: usize, /// The reason for the corruption. reason: String, }, /// Flushing buffered telemetry data to the backend failed. #[error("failed to flush telemetry data: {reason}")] FlushFailed { /// The reason the flush failed. reason: String, }, /// The span collector has reached its capacity limit. #[error("telemetry collector is full (capacity: {capacity} spans)")] CollectorFull { /// The maximum number of spans the collector can hold. capacity: usize, }, /// Exporting telemetry data to an external system failed. #[error("failed to export telemetry data: {reason}")] ExportFailed { /// The reason the export failed. reason: String, }, /// An audit trail signature or hash chain verification failed. /// /// This indicates either a tampered entry, a wrong signer, or a /// corrupted hash chain in the signed audit trail. /// /// # ANVIL Spec ยง14.2 #[error("audit trail verification failed: {reason}")] AuditVerificationFailed { /// Human-readable description of the verification failure. reason: String, }, }