gdk_pixbuf::subclass::prelude

Trait RefCounted

Source
pub unsafe trait RefCounted:
    Sized
    + Clone
    + 'static {
    type InnerType;

    // Required methods
    unsafe fn ref_(this: *const Self::InnerType) -> *const Self::InnerType;
    fn as_ptr(&self) -> *const Self::InnerType;
    unsafe fn into_raw(self) -> *const Self::InnerType;
    unsafe fn from_raw(this: *const Self::InnerType) -> Self;
}

Required Associated Types§

Source

type InnerType

The inner type

Required Methods§

Source

unsafe fn ref_(this: *const Self::InnerType) -> *const Self::InnerType

The function used to increment the inner type refcount

Source

fn as_ptr(&self) -> *const Self::InnerType

Provides access to a raw pointer to InnerType

Source

unsafe fn into_raw(self) -> *const Self::InnerType

Converts the RefCounted object to a raw pointer to InnerType

Source

unsafe fn from_raw(this: *const Self::InnerType) -> Self

Converts a raw pointer to InnerType to a RefCounted object

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.

Implementations on Foreign Types§

Source§

impl<T> RefCounted for Rc<T>
where T: 'static,

Source§

type InnerType = T

Source§

unsafe fn ref_( this: *const <Rc<T> as RefCounted>::InnerType, ) -> *const <Rc<T> as RefCounted>::InnerType

Source§

fn as_ptr(&self) -> *const <Rc<T> as RefCounted>::InnerType

Source§

unsafe fn into_raw(self) -> *const <Rc<T> as RefCounted>::InnerType

Source§

unsafe fn from_raw(this: *const <Rc<T> as RefCounted>::InnerType) -> Rc<T>

Source§

impl<T> RefCounted for Arc<T>
where T: 'static,

Implementors§