unsafe-ref 1.0.0

Allow raw pointer access without those pesky unsafe blocks everywhere!
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 4 items with examples
  • Size
  • Source code size: 4.12 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • sjkillen/unsafe-ref-rust
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sjkillen

unsafe-ref-rust

Allow raw pointer access without those pesky unsafe blocks everywhere!

let mut a = A(0);
let mut x: UnsafeMutRef<dyn Foo> = UnsafeMutRef::new(&mut a);
let mut y: UnsafeMutRef<dyn Foo> = UnsafeMutRef::new(&mut a);
let z: UnsafeRef<dyn Foo> = UnsafeRef::new(&a);
x.set(42);
y.set(z.get() + 10);