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.
Implementations on Foreign Types
impl<'a, P: Ptr, T: ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for Option<T>
[src]
impl<'a, P: Ptr, T: ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for Option<T>
type Storage = Option<<T as ToGlibPtr<'a, P>>::Storage>
fn to_glib_none(&'a self) -> Stash<'a, P, Option<T>>
[src]
fn to_glib_none(&'a self) -> Stash<'a, P, Option<T>>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a, P: Ptr, T: ?Sized + ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for &'a T
[src]
impl<'a, P: Ptr, T: ?Sized + ToGlibPtr<'a, P>> ToGlibPtr<'a, P> for &'a T
type Storage = <T as ToGlibPtr<'a, P>>::Storage
fn to_glib_none(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a> ToGlibPtr<'a, *const c_char> for str
[src]
impl<'a> ToGlibPtr<'a, *const c_char> for str
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
fn to_glib_full(&self) -> *const c_char
[src]
fn to_glib_full(&self) -> *const c_char
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a> ToGlibPtr<'a, *mut c_char> for str
[src]
impl<'a> ToGlibPtr<'a, *mut c_char> for str
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
fn to_glib_full(&self) -> *mut c_char
[src]
fn to_glib_full(&self) -> *mut c_char
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a> ToGlibPtr<'a, *const c_char> for String
[src]
impl<'a> ToGlibPtr<'a, *const c_char> for String
type Storage = CString
fn to_glib_none(&self) -> Stash<'a, *const c_char, String>
[src]
fn to_glib_none(&self) -> Stash<'a, *const c_char, String>
fn to_glib_full(&self) -> *const c_char
[src]
fn to_glib_full(&self) -> *const c_char
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a> ToGlibPtr<'a, *mut c_char> for String
[src]
impl<'a> ToGlibPtr<'a, *mut c_char> for String
type Storage = CString
fn to_glib_none(&self) -> Stash<'a, *mut c_char, String>
[src]
fn to_glib_none(&self) -> Stash<'a, *mut c_char, String>
fn to_glib_full(&self) -> *mut c_char
[src]
fn to_glib_full(&self) -> *mut c_char
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a> ToGlibPtr<'a, *const c_char> for Path
[src]
impl<'a> ToGlibPtr<'a, *const c_char> for Path
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *mut c_char> for Path
[src]
impl<'a> ToGlibPtr<'a, *mut c_char> for Path
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *const c_char> for PathBuf
[src]
impl<'a> ToGlibPtr<'a, *const c_char> for PathBuf
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *mut c_char> for PathBuf
[src]
impl<'a> ToGlibPtr<'a, *mut c_char> for PathBuf
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *const c_char> for OsStr
[src]
impl<'a> ToGlibPtr<'a, *const c_char> for OsStr
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *mut c_char> for OsStr
[src]
impl<'a> ToGlibPtr<'a, *mut c_char> for OsStr
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *const c_char> for OsString
[src]
impl<'a> ToGlibPtr<'a, *const c_char> for OsString
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *const c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *mut c_char> for OsString
[src]
impl<'a> ToGlibPtr<'a, *mut c_char> for OsString
type Storage = CString
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut c_char, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a, P: Ptr, T: ToGlibContainerFromSlice<'a, P>> ToGlibPtr<'a, P> for [T]
[src]
impl<'a, P: Ptr, T: ToGlibContainerFromSlice<'a, P>> ToGlibPtr<'a, P> for [T]
type Storage = T::Storage
fn to_glib_none(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
impl<'a> ToGlibPtr<'a, *mut GHashTable> for HashMap<String, String>
[src]
impl<'a> ToGlibPtr<'a, *mut GHashTable> for HashMap<String, String>
type Storage = HashTable
fn to_glib_none(&self) -> Stash<'a, *mut GHashTable, Self>
[src]
fn to_glib_none(&self) -> Stash<'a, *mut GHashTable, Self>
fn to_glib_full(&self) -> *mut GHashTable
[src]
fn to_glib_full(&self) -> *mut GHashTable
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
impl<'a> ToGlibPtr<'a, *mut GValue> for &'a [&'a ToValue]
[src]
impl<'a> ToGlibPtr<'a, *mut GValue> for &'a [&'a ToValue]
type Storage = ValueArray
fn to_glib_none(&'a self) -> Stash<'a, *mut GValue, Self>
[src]
fn to_glib_none(&'a self) -> Stash<'a, *mut GValue, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_full(&self) -> P
[src]
fn to_glib_full(&self) -> P
Implementors
impl<'a, T: 'static, MM: BoxedMemoryManager<T>> ToGlibPtr<'a, *const T> for Boxed<T, MM> type Storage = &'a Self;
impl<'a, T: 'static, MM> ToGlibPtr<'a, *mut T> for Shared<T, MM> where
MM: SharedMemoryManager<T> + 'static, type Storage = &'a Self;impl<'a> ToGlibPtr<'a, *const GValue> for Value type Storage = &'a Value;