Skip to main content

QMetaCallArg

Trait QMetaCallArg 

Source
pub trait QMetaCallArg: Sized {
    type WireType;

    // Required methods
    fn to_wire(&self) -> Self::WireType;
    fn from_wire(wire: &Self::WireType) -> Self;
    fn wire_metatype() -> QMetaType;
}
Expand description

Enables a type to be used as a signal or slot argument.

Implemented for:

You will not need to implement this trait yourself; adding support for custom types requires CXX/C++ bindings.

Required Associated Types§

Required Methods§

Source

fn to_wire(&self) -> Self::WireType

Source

fn from_wire(wire: &Self::WireType) -> Self

Source

fn wire_metatype() -> QMetaType

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 QMetaCallArg for Value

Available on crate feature serde_json only.
Source§

impl QMetaCallArg for bool

Source§

impl QMetaCallArg for f32

Source§

impl QMetaCallArg for f64

Source§

impl QMetaCallArg for i8

Source§

impl QMetaCallArg for i16

Source§

impl QMetaCallArg for i32

Source§

impl QMetaCallArg for i64

Source§

impl QMetaCallArg for isize

Source§

impl QMetaCallArg for u8

Source§

impl QMetaCallArg for u16

Source§

impl QMetaCallArg for u32

Source§

impl QMetaCallArg for u64

Source§

impl QMetaCallArg for usize

Source§

impl QMetaCallArg for String

Source§

impl QMetaCallArg for Vec<Value>

Available on crate feature serde_json only.
Source§

impl QMetaCallArg for Vec<bool>

Source§

impl QMetaCallArg for Vec<f32>

Source§

impl QMetaCallArg for Vec<f64>

Source§

impl QMetaCallArg for Vec<i8>

Source§

impl QMetaCallArg for Vec<i16>

Source§

impl QMetaCallArg for Vec<i32>

Source§

impl QMetaCallArg for Vec<i64>

Source§

impl QMetaCallArg for Vec<isize>

Source§

impl QMetaCallArg for Vec<u8>

Source§

impl QMetaCallArg for Vec<u16>

Source§

impl QMetaCallArg for Vec<u32>

Source§

impl QMetaCallArg for Vec<u64>

Source§

impl QMetaCallArg for Vec<usize>

Source§

impl QMetaCallArg for Vec<String>

Source§

impl<T> QMetaCallArg for Rc<RefCell<T>>
where T: QObjectHolder,

Source§

type WireType = *mut QObject

Source§

fn to_wire(&self) -> *mut QObject

Source§

fn from_wire(wire: &*mut QObject) -> Rc<RefCell<T>>

Source§

fn wire_metatype() -> QMetaType

Source§

impl<T> QMetaCallArg for Vec<Rc<RefCell<T>>>
where T: QmlRegister,

Source§

type WireType = QList<*mut QObject>

Source§

fn to_wire(&self) -> QList<*mut QObject>

Source§

fn from_wire(wire: &QList<*mut QObject>) -> Vec<Rc<RefCell<T>>>

Source§

fn wire_metatype() -> QMetaType

Implementors§