use-php-attribute 0.0.1

PHP attribute metadata primitives for RustUse.
Documentation
  • Coverage
  • 15%
    6 out of 40 items documented1 out of 29 items with examples
  • Size
  • Source code size: 9.02 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 887.78 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-attribute

PHP attribute metadata primitives for RustUse.

Experimental

use-php-attribute is experimental while use-php remains below 0.3.0.

Example

use use_php_attribute::{PhpAttributeName, PhpAttributeReference, PhpAttributeTarget};

let attribute = PhpAttributeReference::new(PhpAttributeName::new("App\\Route")?)
    .with_target(PhpAttributeTarget::Method);

assert_eq!(attribute.name().as_str(), "App\\Route");
assert_eq!(attribute.targets(), &[PhpAttributeTarget::Method]);
# Ok::<(), use_php_attribute::PhpAttributeError>(())

Scope

  • Attribute names, targets, simple argument metadata, and repeatability flags.

Non-goals

  • Attribute parsing, reflection, evaluation, or framework routing behavior.

License

Licensed under either Apache-2.0 or MIT.