Expand description
§use-php-error
PHP error and diagnostic metadata primitives for RustUse.
§Experimental
use-php-error is experimental while use-php remains below 0.3.0.
§Example
use use_php_error::{DiagnosticMessage, PhpDiagnostic, PhpErrorKind, PhpSeverity};
let diagnostic = PhpDiagnostic::new(
PhpErrorKind::Runtime,
PhpSeverity::Error,
DiagnosticMessage::new("Undefined variable")?,
);
assert_eq!(diagnostic.severity(), PhpSeverity::Error);§Scope
- PHP error levels, diagnostic categories, severity mapping, and diagnostic message/source metadata.
§Non-goals
- Runtime error handling, stack traces, logging, or analyzer rule engines.
§License
Licensed under either Apache-2.0 or MIT.
Structs§
- Diagnostic
Message - Diagnostic
Source - PhpDiagnostic
- PHP diagnostic metadata.
Enums§
- PhpDiagnostic
Error - Error returned when PHP diagnostic metadata is invalid.
- PhpError
Kind - Broad PHP diagnostic category metadata.
- PhpError
Level - PHP error level metadata.
- PhpSeverity
- Severity metadata for PHP diagnostics.