use-php-error 0.0.1

PHP error and diagnostic metadata primitives for RustUse.
Documentation
  • Coverage
  • 12.24%
    6 out of 49 items documented1 out of 22 items with examples
  • Size
  • Source code size: 10.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 827.29 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-php
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

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);
# Ok::<(), use_php_error::PhpDiagnosticError>(())

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.