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 { ... } }
Expand description

Translate to a pointer.

Associated Types

Required methods

Transfer: none.

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

Provided methods

Transfer: container.

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

Transfer: full.

We transfer the ownership to the foreign library.

Implementations on Foreign Types

Implementors

impl<'a> ToGlibPtr<'a, *mut cairo_t> for &'a Context

impl<'a> ToGlibPtr<'a, *mut cairo_device_t> for Device

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for ImageSurface

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for RecordingSurface

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for Surface

impl<'a> ToGlibPtr<'a, *mut xcb_connection_t> for &'a XCBConnection

impl<'a> ToGlibPtr<'a, *mut xcb_render_pictforminfo_t> for &'a XCBRenderPictFormInfo

impl<'a> ToGlibPtr<'a, *mut xcb_screen_t> for &'a XCBScreen

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for XCBSurface

impl<'a> ToGlibPtr<'a, *mut xcb_visualtype_t> for &'a XCBVisualType

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for PdfSurface

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for PsSurface

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for SvgSurface

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for QuartzSurface

impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for Win32Surface