[go: up one dir, main page]

Trait glib::translate::ToGlibPtr

source ·
pub trait ToGlibPtr<'a, P: Copy> {
    type Storage;

    // Required method
    fn to_glib_none(&'a self) -> Stash<'a, P, Self>;

    // Provided method
    fn to_glib_full(&self) -> P { ... }
}
Expand description

Translate to a pointer.

Required Associated Types§

Required Methods§

source

fn to_glib_none(&'a self) -> Stash<'a, P, Self>

Transfer: none.

The pointer in the Stash is only valid for the lifetime of the Stash.

Provided Methods§

source

fn to_glib_full(&self) -> P

Transfer: full.

We transfer the ownership to the foreign library.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> ToGlibPtr<'a, *const i8> for str

source§

impl<'a> ToGlibPtr<'a, *const i8> for String

source§

impl<'a> ToGlibPtr<'a, *mut i8> for str

source§

impl<'a> ToGlibPtr<'a, *mut GHashTable> for HashMap<String, String>

source§

impl<'a, P: Ptr, T: ToGlibPtr<'a, P>> ToGlibPtr<'a, *mut P> for [T]

§

type Storage = PtrArray<'a, P, T>

source§

fn to_glib_none(&'a self) -> Stash<'a, *mut P, Self>

source§

impl<'a, P: Ptr, T: ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for Option<T>

§

type Storage = Option<<T as ToGlibPtr<'a, P>>::Storage>

source§

fn to_glib_none(&'a self) -> Stash<'a, P, Option<T>>

source§

fn to_glib_full(&self) -> P

source§

impl<'a, P: Ptr, T: ?Sized + ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for &'a T

§

type Storage = <T as ToGlibPtr<'a, P>>::Storage

source§

fn to_glib_none(&'a self) -> Stash<'a, P, Self>

source§

fn to_glib_full(&self) -> P

Implementors§

source§

impl<'a> ToGlibPtr<'a, *const GAppInfo> for AppInfo

§

type Storage = <ObjectRef as ToGlibPtr<'a, *mut GObject>>::Storage

source§

impl<'a> ToGlibPtr<'a, *const GObject> for Object

§

type Storage = <ObjectRef as ToGlibPtr<'a, *mut GObject>>::Storage

source§

impl<'a> ToGlibPtr<'a, *mut GAppInfo> for AppInfo

§

type Storage = <ObjectRef as ToGlibPtr<'a, *mut GObject>>::Storage

source§

impl<'a> ToGlibPtr<'a, *mut GObject> for Object

§

type Storage = <ObjectRef as ToGlibPtr<'a, *mut GObject>>::Storage

source§

impl<'a> ToGlibPtr<'a, *mut GObject> for AppInfo

§

type Storage = <ObjectRef as ToGlibPtr<'a, *mut GObject>>::Storage

source§

impl<'a, T: 'static, MM> ToGlibPtr<'a, *mut T> for Refcounted<T, MM>
where MM: RefcountedMemoryManager<T> + 'static,

§

type Storage = &'a Refcounted<T, MM>

source§

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

§

type Storage = &'a Boxed<T, MM>