Trait FromGlibPtrFull

pub trait FromGlibPtrFull<P>: Sized
where P: Ptr,
{ // Required method unsafe fn from_glib_full(ptr: P) -> Self; }
Expand description

Translate from a pointer type which is annotated with transfer full. This transfers the ownership of the value to the Rust side.

Because ownership can only be transferred if something is already referenced, this is unsuitable for floating references.

§Safety

The implementation of this trait should not alter the reference count or make copies of the underlying value. Values obtained using this trait must be properly released on drop() by the implementing type.

For more information, refer to module level documentation.

Required Methods§

unsafe fn from_glib_full(ptr: P) -> Self

§Safety

See trait level notes on safety

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.

Implementations on Foreign Types§

§

impl FromGlibPtrFull<*const i8> for String

§

unsafe fn from_glib_full(ptr: *const i8) -> String

§

impl FromGlibPtrFull<*const i8> for OsString

§

impl FromGlibPtrFull<*const i8> for PathBuf

§

impl FromGlibPtrFull<*mut i8> for String

§

unsafe fn from_glib_full(ptr: *mut i8) -> String

§

impl FromGlibPtrFull<*mut i8> for OsString

§

unsafe fn from_glib_full(ptr: *mut i8) -> OsString

§

impl FromGlibPtrFull<*mut i8> for PathBuf

§

unsafe fn from_glib_full(ptr: *mut i8) -> PathBuf

§

impl FromGlibPtrFull<*mut cairo_device_t> for Device

§

unsafe fn from_glib_full(ptr: *mut cairo_device_t) -> Device

§

impl FromGlibPtrFull<*mut cairo_surface_t> for ImageSurface

§

unsafe fn from_glib_full(ptr: *mut cairo_surface_t) -> ImageSurface

§

impl FromGlibPtrFull<*mut cairo_surface_t> for RecordingSurface

§

unsafe fn from_glib_full(ptr: *mut cairo_surface_t) -> RecordingSurface

§

impl FromGlibPtrFull<*mut cairo_surface_t> for Surface

§

unsafe fn from_glib_full(ptr: *mut cairo_surface_t) -> Surface

§

impl FromGlibPtrFull<*mut cairo_t> for Context

§

unsafe fn from_glib_full(ptr: *mut cairo_t) -> Context

§

impl<P, T> FromGlibPtrFull<P> for Option<T>
where P: Ptr, T: FromGlibPtrFull<P>,

§

unsafe fn from_glib_full(ptr: P) -> Option<T>

Implementors§

§

impl<T, MM> FromGlibPtrFull<*const T> for Boxed<T, MM>
where T: 'static, MM: BoxedMemoryManager<Target = T>,

§

impl<T, MM> FromGlibPtrFull<*mut T> for Boxed<T, MM>
where T: 'static, MM: BoxedMemoryManager<Target = T>,

§

impl<T, MM> FromGlibPtrFull<*mut T> for Shared<T, MM>
where T: 'static, MM: SharedMemoryManager<Target = T>,