Trait WxRustMethods

Source
pub trait WxRustMethods {
    type Unowned;

    // Required methods
    unsafe fn as_ptr(&self) -> *mut c_void;
    unsafe fn from_ptr(ptr: *mut c_void) -> Self;
    unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned;
    unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F);

    // Provided method
    unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

Source

unsafe fn as_ptr(&self) -> *mut c_void

Source

unsafe fn from_ptr(ptr: *mut c_void) -> Self

Source

unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned

Source

unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)

Provided Methods§

Source

unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>
where Self: Sized,

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.

Implementors§

Source§

impl<const OWNED: bool> WxRustMethods for ArrayIntIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for ArrayStringIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for ClassInfoIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for ClientDataIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for DateTimeIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for EventIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for EvtHandlerIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for FileNameIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for MessageOutputIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for ObjectIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for ObjectRefDataIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for RefCounterIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for StandardPathsIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for StringConstIteratorIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for TimerEventIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for TimerIsOwned<OWNED>

Source§

impl<const OWNED: bool> WxRustMethods for VariantDataIsOwned<OWNED>