9 个版本 (5 个破坏性更新)
0.6.0 | 2022 年 11 月 3 日 |
---|---|
0.5.2 | 2022 年 10 月 10 日 |
0.5.1 | 2022 年 7 月 2 日 |
0.4.0 | 2022 年 6 月 30 日 |
0.1.0 | 2022 年 6 月 28 日 |
#7 in #span
20,576 每月下载量
在 52 个包中使用 (通过 json-syntax)
44KB
1.5K SLoC
为 locspan
代码映射库提供派生宏。
该库提供了 StrippedPartialEq
派生宏,用于自动实现 locspan
库中定义的 StrippedPartialEq
比较特性。
用法
use locspan::Loc;
use locspan_derive::StrippedPartialEq;
// Implement `StrippedPartialEq` for the `Foo` type.
// Type parameters will be required to implement
// `StrippedPartialEq` themselves unless they are marked
// with `#[stripped]`.
#[derive(StrippedPartialEq)]
struct Foo<T, #[stripped] S, #[stripped] P> {
a: Loc<T, S, P>,
// Files are compared using `StrippedPartialEq`
// unless they are marked with `#[stripped]`, in
// which case `PartialEq` is used.
#[stripped]
b: std::path::PathBuf
}
许可
许可协议为以下之一
- Apache 许可证 2.0 (LICENSE-APACHE 或 https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT 许可证 (LICENSE-MIT 或 http://opensource.org/licenses/MIT)
由您选择。
贡献
除非您明确声明,否则任何有意提交以包含在作品中的贡献,根据 Apache-2.0 许可证的定义,应按上述方式双重许可,不附加任何额外条款或条件。
依赖
~1.5MB
~35K SLoC