pub trait FromGlibPtrNone<P: Ptr>: Sized {
    // Required method
    unsafe fn from_glib_none(ptr: P) -> Self;
}
Expand description

Translate from a pointer type which is annotated with transfer none. The resulting value is referenced at least once, by the bindings.

This is suitable for floating references, which become strong references. It is also suitable for acquiring non-gobject values, like gchar*.

Safety

The implementation of this trait should acquire a reference to the value in a way appropriate to the type, e.g. by increasing the reference count or copying. 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§

source

unsafe fn from_glib_none(ptr: P) -> Self

Safety

See trait level notes on safety

Implementations on Foreign Types§

source§

impl FromGlibPtrNone<*const i8> for PathBuf

source§

unsafe fn from_glib_none(ptr: *const c_char) -> Self

source§

impl FromGlibPtrNone<*mut i8> for PathBuf

source§

unsafe fn from_glib_none(ptr: *mut c_char) -> Self

source§

impl FromGlibPtrNone<*const i8> for OsString

source§

unsafe fn from_glib_none(ptr: *const c_char) -> Self

source§

impl<P: Ptr, T: FromGlibPtrNone<P>> FromGlibPtrNone<P> for Option<T>

source§

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

source§

impl FromGlibPtrNone<*const i8> for String

source§

unsafe fn from_glib_none(ptr: *const c_char) -> Self

source§

impl FromGlibPtrNone<*mut i8> for OsString

source§

unsafe fn from_glib_none(ptr: *mut c_char) -> Self

source§

impl FromGlibPtrNone<*mut i8> for String

source§

unsafe fn from_glib_none(ptr: *mut c_char) -> Self

Implementors§

source§

impl<T: 'static, MM: BoxedMemoryManager<T>> FromGlibPtrNone<*const T> for Boxed<T, MM>

source§

impl<T: 'static, MM: BoxedMemoryManager<T>> FromGlibPtrNone<*mut T> for Boxed<T, MM>

source§

impl<T: 'static, MM: SharedMemoryManager<T>> FromGlibPtrNone<*const T> for Shared<T, MM>

source§

impl<T: 'static, MM: SharedMemoryManager<T>> FromGlibPtrNone<*mut T> for Shared<T, MM>