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:
- Primitive numeric types and
bool StringVec<T>whereTis one of the aboveRc<RefCell<T>>whereTimplementsQObjectHolderVec<Rc<RefCell<T>>>whereTimplementsQmlRegister
You will not need to implement this trait yourself; adding support for custom types requires CXX/C++ bindings.
Required Associated Types§
Required Methods§
fn to_wire(&self) -> Self::WireType
fn from_wire(wire: &Self::WireType) -> Self
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.
impl QMetaCallArg for Value
Available on crate feature
serde_json only.type WireType = QJsonValue
fn to_wire(&self) -> QJsonValue
fn from_wire(wire: &QJsonValue) -> Value
fn wire_metatype() -> QMetaType
Source§impl QMetaCallArg for bool
impl QMetaCallArg for bool
Source§impl QMetaCallArg for f32
impl QMetaCallArg for f32
Source§impl QMetaCallArg for f64
impl QMetaCallArg for f64
Source§impl QMetaCallArg for i8
impl QMetaCallArg for i8
Source§impl QMetaCallArg for i16
impl QMetaCallArg for i16
Source§impl QMetaCallArg for i32
impl QMetaCallArg for i32
Source§impl QMetaCallArg for i64
impl QMetaCallArg for i64
Source§impl QMetaCallArg for isize
impl QMetaCallArg for isize
Source§impl QMetaCallArg for u8
impl QMetaCallArg for u8
Source§impl QMetaCallArg for u16
impl QMetaCallArg for u16
Source§impl QMetaCallArg for u32
impl QMetaCallArg for u32
Source§impl QMetaCallArg for u64
impl QMetaCallArg for u64
Source§impl QMetaCallArg for usize
impl QMetaCallArg for usize
Source§impl QMetaCallArg for String
impl QMetaCallArg for String
Source§impl QMetaCallArg for Vec<Value>
Available on crate feature serde_json only.
impl QMetaCallArg for Vec<Value>
Available on crate feature
serde_json only.