Skip to main content

QCppProxy

Trait QCppProxy 

Source
pub trait QCppProxy {
    type ProxyRustType: QRustProxy;

    // Required methods
    fn get_static_meta_object() -> &'static QMetaObject;
    fn get_size() -> usize;
    fn get_align() -> usize;
    fn parser_status_cast() -> i32;
    unsafe fn create(
        rust_proxy: *mut Self::ProxyRustType,
        metaobject: &'static DynamicMetaObjectData,
    ) -> *mut Self;
    unsafe fn create_at(
        rust_proxy: *mut Self::ProxyRustType,
        metaobject: &'static DynamicMetaObjectData,
        addr: *mut u8,
    ) -> *mut Self;
    fn emit_signal(self: Pin<&mut Self>, signal_name: &str, argv: &[*const u8]);
}
Expand description

QCppProxy defines what a C++ proxy to a QObject (C++) must implement.

This includes access to the C++ static meta-object, which is then extended on the Rust side to create a dynamic meta-object.

Required Associated Types§

Required Methods§

Source

fn get_static_meta_object() -> &'static QMetaObject

Source

fn get_size() -> usize

Source

fn get_align() -> usize

Source

fn parser_status_cast() -> i32

Source

unsafe fn create( rust_proxy: *mut Self::ProxyRustType, metaobject: &'static DynamicMetaObjectData, ) -> *mut Self

Source

unsafe fn create_at( rust_proxy: *mut Self::ProxyRustType, metaobject: &'static DynamicMetaObjectData, addr: *mut u8, ) -> *mut Self

Source

fn emit_signal(self: Pin<&mut Self>, signal_name: &str, argv: &[*const u8])

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§