cib 0.1.4

proc-macros for crate cib
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![cfg(feature = "derive")]

use cib::Cib;

#[derive(Clone, PartialEq, Debug, Cib)]
struct D(u32);

#[test]
fn derive_creates_impls() {
    let a = D(3);
    let b = D(4);
    // Using Cib<D> for owned and &D for borrowed
    assert_eq!(a.cib(), D(3));
    assert_eq!((&b).cib(), D(4));
}