Trait FromRaw

Source
pub trait FromRaw<T: 'static> {
    // Required method
    unsafe fn from_raw(ptr: *mut T) -> Self;
}
Expand description

Convert from a raw pointer

Required Methods§

Source

unsafe fn from_raw(ptr: *mut T) -> Self

Create an object from a given raw pointer.

The reference count will not be increased, be sure not to free this pointer.

§Safety

The pointer has to be a valid reference to the expected underlying udev-struct or undefined behaviour might occur.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl FromRaw<udev> for Udev