Trait udev::FromRawWithContext [−][src]
Convert from a raw pointer for types which must be associated with a Udev
context object.
Required methods
unsafe fn from_raw_with_context(udev: *mut udev, ptr: *mut T) -> Self
[src]
Create an object from a given raw pointer and udev
context pointer.
The reference count will not be increased, be sure not to free this pointer.
Safety
The udev
pointer must correspond to the udev
pointer used when ptr
was created. If
not memory corruption and undefined behavior will result.
Both the udev
and ptr
pointers must be a valid reference to the expected underlying udev-struct or undefined
behaviour might occur. Do NOT attempt to free either pointer; udev_unref
and the
corresponding *_unref
function for ptr
will be called automatically when this type is
dropped.