Struct qmetaobject::qtdeclarative::QJSValue
source · #[repr(C)]pub struct QJSValue { /* private fields */ }
Expand description
Wrapper for QJSValue
Implementations§
source§impl QJSValue
impl QJSValue
pub fn is_bool(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_string(&self) -> bool
pub fn to_string(&self) -> QString
pub fn to_bool(&self) -> bool
pub fn to_number(&self) -> f64
pub fn to_variant(&self) -> QVariant
pub fn to_qobject<'a, T: QObject + 'a>(&'a self) -> Option<QObjectPinned<'a, T>>
Trait Implementations§
source§impl QMetaType for QJSValue
impl QMetaType for QJSValue
fn id() -> i32
source§fn to_qvariant(&self) -> QVariant
fn to_qvariant(&self) -> QVariant
Returns a QVariant containing a copy of this object
source§fn from_qvariant(variant: QVariant) -> Option<Self>
fn from_qvariant(variant: QVariant) -> Option<Self>
Attempt to convert from a QVariant to this type.
source§const CONVERSION_TO_STRING: Option<fn(_: &Self) -> QString> = None
const CONVERSION_TO_STRING: Option<fn(_: &Self) -> QString> = None
If this is set to a function, it enable the conversion to and from QString
const CONVERSION_FROM_STRING: Option<fn(_: &QString) -> Self> = None
Auto Trait Implementations§
impl RefUnwindSafe for QJSValue
impl Send for QJSValue
impl Sync for QJSValue
impl Unpin for QJSValue
impl UnwindSafe for QJSValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more