pub struct Example {
pub name: String,
pub consumer_item: String,
pub assertion_body: String,
}Expand description
One worked example: a consumer struct/enum + the assertions that should hold after applying the derive.
Fields§
§name: StringHuman-readable name — used as the consumer crate suffix.
consumer_item: StringSource of the consumer struct/enum (raw Rust). The #[derive(<X>)]
attribute is added by the harness; do not include it.
assertion_body: String#[test] body that runs against the consumer item. Has access to
the type via super::*.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Example
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnsafeUnpin for Example
impl UnwindSafe for Example
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more