[][src]Trait glib::translate::ToGlibPtr

pub trait ToGlibPtr<'a, P: Copy> {
    type Storage;
    fn to_glib_none(&'a self) -> Stash<'a, P, Self>;

    fn to_glib_container(&'a self) -> Stash<'a, P, Self> { ... }
fn to_glib_full(&self) -> P { ... } }

Translate to a pointer.

Associated Types

type Storage

Loading content...

Required methods

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.

Loading content...

Provided methods

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

Transfer: container.

We transfer the container ownership to the foreign library retaining the elements ownership.

fn to_glib_full(&self) -> P

Transfer: full.

We transfer the ownership to the foreign library.

Loading content...

Implementations on Foreign Types

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

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

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

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

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

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

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

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

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

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

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

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

impl<'a> ToGlibPtr<'a, *mut i8> for String[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

impl<'a> ToGlibPtr<'a, *const i8> for Path[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *mut i8> for Path[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *const i8> for PathBuf[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *mut i8> for PathBuf[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *const i8> for OsStr[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *mut i8> for OsStr[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *const i8> for OsString[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a> ToGlibPtr<'a, *mut i8> for OsString[src]

type Storage = CString

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

fn to_glib_full(&self) -> P[src]

impl<'a, P: Ptr, T: ToGlibContainerFromSlice<'a, P>> ToGlibPtr<'a, P> for [T][src]

type Storage = T::Storage

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

type Storage = HashTable

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

Loading content...

Implementors

impl<'a, T: 'static, MM> ToGlibPtr<'a, *mut T> for Shared<T, MM> where
    MM: SharedMemoryManager<T> + 'static, 
[src]

type Storage = &'a Self

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

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

type Storage = &'a Self

fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]

Loading content...