ptr_meta
A radioactive stabilization of the ptr_meta
RFC.
Documentation
- ptr_meta, the core library
- ptr_meta_derive, proc macros for
implementing
Pointee
for structs and trait objects
Example
// Get the associated metadata for pointers
let str = "hello world";
assert_eq!;
let slice = & as &;
assert_eq!;
// Make your own wide pointers from data pointers and metadata
let bytes = ;
let ptr = ;
println!; // prints "hello world!"
// Derive Pointee on your own types
let ptr = ;
let cool = unsafe ;
cool.print_cool; // prints "😎 hello 😎"
// Implement Pointee for trait objects
let i32_vtable = metadata;
let one_hundred = 100i32;
let printable = ;
unsafe