Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
apply_attr
Synopsis
A syntax extension providing higher-order attributes to Rust.
Motivation
Sometimes it would be desirable to be able to apply certain attributes to all items in a scope (mod
, trait
or impl
). The apply_attr
crate aims to provide a versatile API for this.
Possible use-cases would be:
- Make all structs in mod
xyz
use#[derive(PartialEq)]
. - Mark all methods in a certain
impl
with#[inline(never)]
(for profiling, e.g.). - …
Getting Started
Add the following to your dependencies in your project's Cargo.toml
:
= "0.1.0"
… or whatever other version is more up-to-date.
Then add …
… to your crate's root file (e.g. lib.rs
, main.rs
).
This gives you access to the following attributes:
// available for: mod
// available for: mods
// available for: mods
// available for: mods/impls/traits
// available for: mods/impls/traits
// available for: mods
// available for: mods
// available for: mods/impls/traits
// available for: mods
// available for: mods
// available for: mods
// available for: mods
// available for: mods
// available for: mods/impls
Example
;
API Reference
Debugging
To see how the attributes were applied compile your crate using this (requires nightly
):
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Vincent Esche - Initial work - Regexident
See also the list of contributors who participated in this project.
License
This project is licensed under the BSD License - see the LICENSE.md file for details.