pub trait ToGlibPtr<'a, P: Copy> {
type Storage;
// Required method
fn to_glib_none(&'a self) -> Stash<'a, P, Self>;
// Provided methods
fn to_glib_container(&'a self) -> Stash<'a, P, Self> { ... }
fn to_glib_full(&self) -> P { ... }
}
Expand description
Translate to a pointer.
Required Associated Types§
Required Methods§
Sourcefn to_glib_none(&'a self) -> Stash<'a, P, Self>
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§
Sourcefn to_glib_container(&'a self) -> Stash<'a, P, Self>
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.
Sourcefn to_glib_full(&self) -> P
fn to_glib_full(&self) -> P
Transfer: full.
We transfer the ownership to the foreign library.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.