2014-04-13 22:22 GMT+02:00 György Andrasek <[email protected]>:

> You could make a container struct:
>
>     struct Dev {
>         ptr: *mut InternalDev
>     }
>
> and then impl your methods on that.
>
>
I'd recommend using `Unsafe` which was added to wrap types T and indicate
an *unsafe interior*. It exposes a `get` method that returns a `*mut`
pointer to the wrapped data.

Here's the link to the Unsafe docstring (which also contains an example):
https://github.com/mozilla/rust/blob/master/src/libstd/ty.rs#L16


Flavio


-- 
Flavio (@flaper87) Percoco
http://www.flaper87.com
http://github.com/FlaPer87
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to