[][src]Trait glib::translate::FromGlibPtrNone

pub trait FromGlibPtrNone<P: Ptr>: Sized {
    unsafe fn from_glib_none(ptr: P) -> Self;

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*.


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

unsafe fn from_glib_none(ptr: P) -> Self


See trait level notes on safety

Loading content...

Implementations on Foreign Types

impl<P: Ptr, T: FromGlibPtrNone<P>> FromGlibPtrNone<P> for Option<T>[src]

impl FromGlibPtrNone<*const i8> for String[src]

impl FromGlibPtrNone<*mut i8> for String[src]

impl FromGlibPtrNone<*const i8> for PathBuf[src]

impl FromGlibPtrNone<*mut i8> for PathBuf[src]

impl FromGlibPtrNone<*const i8> for OsString[src]

impl FromGlibPtrNone<*mut i8> for OsString[src]

Loading content...


impl FromGlibPtrNone<*const GValue> for SendValue[src]

impl FromGlibPtrNone<*const GValue> for Value[src]

impl FromGlibPtrNone<*mut GValue> for SendValue[src]

impl FromGlibPtrNone<*mut GValue> for Value[src]

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

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

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

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

Loading content...