Crates.io | boulder_derive |
lib.rs | boulder_derive |
version | 0.3.0 |
source | src |
created_at | 2022-04-04 20:44:53.194023 |
updated_at | 2022-06-17 21:28:49.319407 |
description | Macros for the boulder crate |
homepage | |
repository | https://github.com/eds-collabora/boulder-rs |
max_upload_size | |
id | 562284 |
size | 165,871 |
This provides two main traits and associated derive macros:
Buildable
,
which lets you set complex default values, and then customise only
the fields of interest for a given instance.Generatable
which lets you set default sequences for each field, and then
override only the particular sequences of interest.These traits pass-through
Option<T>
,
Cell<T>
,
RefCell<T>
,
Rc<T>
,
Arc<T>
and
Mutex<T>
in
the sense deriving
Generatable
or
Buildable
for T
automatically gives you default generators and builders for
all of these simple wrappers.
If you enable the persian-rug
feature, you get two new traits:
BuildableWithPersianRug
,
which lets you build instances which belong to a
persian_rug::Context
.GeneratableWithPersianRug
,
which lets you generate instances which belong to a
persian_rug::Context
.These traits pass-through all the same all the same wrappers as the
base traits, but additionally
Proxy<T>
.
This crate is made available under either an Apache-2.0 or an MIT license.