pub trait ToGlibPtr<'a, P>where
    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§

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> ToGlibPtr<'a, *const i8> for OsStr

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *const i8, OsStr>

§

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

§

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

§

impl<'a> ToGlibPtr<'a, *mut GHashTable> for HashMap<String, String, RandomState>

§

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

§

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

§

fn to_glib_none(&'a self) -> Stash<'a, P, &'a T>

§

fn to_glib_full(&self) -> P

§

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

§

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

§

fn to_glib_none(&'a self) -> Stash<'a, P, [T]>

§

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

§

fn to_glib_full(&self) -> P

§

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

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *mut i8, PathBuf>

§

fn to_glib_full(&self) -> *mut i8

§

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

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *const i8, Path>

§

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

§

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

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *mut i8, OsStr>

§

fn to_glib_full(&self) -> *mut i8

§

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

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *mut i8, str>

§

fn to_glib_full(&self) -> *mut i8

§

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

§

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

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *mut i8, Path>

§

fn to_glib_full(&self) -> *mut i8

§

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

§

type Storage = CString

§

fn to_glib_none(&'a self) -> Stash<'a, *const i8, str>

§

fn to_glib_full(&self) -> *const i8

§

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

§

impl<'a> ToGlibPtr<'a, *const GdkEventMotion> for EventMotion

§

type Storage = &'a EventMotion

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventMotion, EventMotion>

§

impl<'a> ToGlibPtr<'a, *const GdkEventPadAxis> for EventPadAxis

§

type Storage = &'a EventPadAxis

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventPadAxis, EventPadAxis>

§

impl<'a> ToGlibPtr<'a, *const GdkEventExpose> for EventExpose

§

type Storage = &'a EventExpose

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventExpose, EventExpose>

§

impl<'a> ToGlibPtr<'a, *const GdkEventWindowState> for EventWindowState

§

type Storage = &'a EventWindowState

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventWindowState, EventWindowState>

§

impl<'a> ToGlibPtr<'a, *const GdkEventSelection> for EventSelection

§

type Storage = &'a EventSelection

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventSelection, EventSelection>

§

impl<'a> ToGlibPtr<'a, *const GdkEventProximity> for EventProximity

§

type Storage = &'a EventProximity

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventProximity, EventProximity>

§

impl<'a> ToGlibPtr<'a, *mut GdkWindowAttr> for WindowAttr

§

type Storage = (Box<GdkWindowAttr, Global>, Stash<'a, *mut GdkVisual, Option<Visual>>, Stash<'a, *mut GdkCursor, Option<Cursor>>, Stash<'a, *const i8, Option<String>>)

§

fn to_glib_none(&'a self) -> Stash<'a, *mut GdkWindowAttr, WindowAttr>

§

impl<'a> ToGlibPtr<'a, *const GdkEventScroll> for EventScroll

§

type Storage = &'a EventScroll

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventScroll, EventScroll>

§

impl<'a> ToGlibPtr<'a, *const GdkEventGrabBroken> for EventGrabBroken

§

type Storage = &'a EventGrabBroken

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventGrabBroken, EventGrabBroken>

§

impl<'a> ToGlibPtr<'a, *const GdkEventFocus> for EventFocus

§

type Storage = &'a EventFocus

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventFocus, EventFocus>

§

impl<'a> ToGlibPtr<'a, *const GdkEventTouchpadSwipe> for EventTouchpadSwipe

§

type Storage = &'a EventTouchpadSwipe

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventTouchpadSwipe, EventTouchpadSwipe>

§

impl<'a> ToGlibPtr<'a, *const GdkEventVisibility> for EventVisibility

§

type Storage = &'a EventVisibility

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventVisibility, EventVisibility>

§

impl<'a> ToGlibPtr<'a, *const GdkEventPadButton> for EventPadButton

§

type Storage = &'a EventPadButton

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventPadButton, EventPadButton>

§

impl<'a> ToGlibPtr<'a, *const GdkEventDND> for EventDND

§

type Storage = &'a EventDND

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventDND, EventDND>

§

impl<'a> ToGlibPtr<'a, *const GdkEventButton> for EventButton

§

type Storage = &'a EventButton

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventButton, EventButton>

§

impl<'a> ToGlibPtr<'a, *const GdkEventPadGroupMode> for EventPadGroupMode

§

type Storage = &'a EventPadGroupMode

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventPadGroupMode, EventPadGroupMode>

§

impl<'a> ToGlibPtr<'a, *const GdkEventProperty> for EventProperty

§

type Storage = &'a EventProperty

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventProperty, EventProperty>

§

impl<'a> ToGlibPtr<'a, *const GdkEventAny> for Event

§

type Storage = &'a Event

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventAny, Event>

§

impl<'a> ToGlibPtr<'a, *const GdkEventConfigure> for EventConfigure

§

type Storage = &'a EventConfigure

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventConfigure, EventConfigure>

§

impl<'a> ToGlibPtr<'a, *const GdkEventOwnerChange> for EventOwnerChange

§

type Storage = &'a EventOwnerChange

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventOwnerChange, EventOwnerChange>

§

impl<'a> ToGlibPtr<'a, *mut _GdkAtom> for Atom

§

type Storage = ()

§

fn to_glib_none(&self) -> Stash<'a, *mut _GdkAtom, Atom>

§

impl<'a> ToGlibPtr<'a, *const GdkEventSetting> for EventSetting

§

type Storage = &'a EventSetting

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventSetting, EventSetting>

§

impl<'a> ToGlibPtr<'a, *const GdkEventTouch> for EventTouch

§

type Storage = &'a EventTouch

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventTouch, EventTouch>

§

impl<'a> ToGlibPtr<'a, *const GdkEventTouchpadPinch> for EventTouchpadPinch

§

type Storage = &'a EventTouchpadPinch

§

fn to_glib_none( &'a self ) -> Stash<'a, *const GdkEventTouchpadPinch, EventTouchpadPinch>

§

impl<'a> ToGlibPtr<'a, *const GdkEventCrossing> for EventCrossing

§

type Storage = &'a EventCrossing

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventCrossing, EventCrossing>

§

impl<'a> ToGlibPtr<'a, *const GdkEventKey> for EventKey

§

type Storage = &'a EventKey

§

fn to_glib_none(&'a self) -> Stash<'a, *const GdkEventKey, EventKey>

§

impl<'a> ToGlibPtr<'a, *mut *mut _GIOExtensionPoint> for &'a IOExtensionPoint

§

type Storage = &'a IOExtensionPoint

§

fn to_glib_none( &self ) -> Stash<'a, *mut *mut _GIOExtensionPoint, &'a IOExtensionPoint>

§

impl<'a> ToGlibPtr<'a, *mut *mut _GIOExtension> for &'a IOExtension

§

type Storage = &'a IOExtension

§

fn to_glib_none(&self) -> Stash<'a, *mut *mut _GIOExtension, &'a IOExtension>

Implementors§

§

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

§

type Storage = &'a Device

§

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

§

type Storage = &'a Surface

§

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

§

type Storage = &'a Surface

§

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

§

type Storage = &'a Surface

§

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

§

type Storage = &'a Surface

§

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

§

type Storage = &'a Context

§

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

§

type Storage = &'a XCBScreen

§

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

§

impl<'a, P, T> ToGlibPtr<'a, P> for Option<T>where P: Ptr, T: ToGlibPtr<'a, P>,

§

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

§

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

§

type Storage = &'a Boxed<T, MM>

§

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

§

type Storage = &'a Shared<T, MM>