Expand description
Trait for types that allow to be initialized from a raw pointer
Required Methods
sourceunsafe fn from_raw(_: *mut T, context: &Libinput) -> Self
unsafe fn from_raw(_: *mut T, context: &Libinput) -> Self
Create a new instance of this type from a raw pointer and it’s context.
Warning
If you make use of Userdata
make sure you use the correct types
to allow receiving the set userdata. When dealing with raw pointers initialized by other
libraries this must be done extra carefully to select a correct representation.
If unsure using ()
is always a safe option..
Unsafety
If the pointer is pointing to a different struct, invalid memory or NULL
the returned
struct may panic on use or cause other undefined behavior.