read-only 0.1.1

Read-only field exposure and safe composition helpers via proc macros
Documentation
use read_only::cast;

mod m {
    use super::cast;

    #[cast]
    pub struct Demo {
        pub a: i32,
        pub b: i32,
    }

    impl Demo {
        pub fn new(a: i32, b: i32) -> Self {
            Self { a, b }
        }

        pub fn mutate(&mut self) {
            self.a += 1;
            self.b += 1;
        }
    }
}

fn main() {
    let mut demo = m::Demo::new(1, 2);
    demo.mutate();
    let _ = demo.a + demo.b;
}