Trait glib::translate::ToGlibPtr
[−]
[src]
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
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
.
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.
Implementors
impl<'a, T: 'static, MM: BoxedMemoryManager<T>> ToGlibPtr<'a, *const T> for Boxed<T, MM>
impl<'a, T: 'static, MM> ToGlibPtr<'a, *mut T> for Shared<T, MM> where
MM: SharedMemoryManager<T> + 'static,impl<'a, P: Ptr, T: ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for Option<T>
impl<'a, P: Ptr, T: ?Sized + ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for &'a T
impl<'a> ToGlibPtr<'a, *const c_char> for str
impl<'a> ToGlibPtr<'a, *mut c_char> for str
impl<'a> ToGlibPtr<'a, *const c_char> for String
impl<'a> ToGlibPtr<'a, *mut c_char> for String
impl<'a> ToGlibPtr<'a, *const c_char> for Path
impl<'a> ToGlibPtr<'a, *mut c_char> for Path
impl<'a, P: Ptr, T: ToGlibPtr<'a, P>> ToGlibPtr<'a, *mut P> for [T]
impl<'a, T> ToGlibPtr<'a, *mut GList> for [T] where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,impl<'a, T> ToGlibPtr<'a, *mut GSList> for [T] where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,impl<'a> ToGlibPtr<'a, *mut GHashTable> for HashMap<String, String>
impl<'a> ToGlibPtr<'a, *const GValue> for Value
impl<'a> ToGlibPtr<'a, *mut GValue> for &'a [&'a ToValue]