Skip to main content

QJsonDocument

Struct QJsonDocument 

Source
pub struct QJsonDocument { /* private fields */ }
Expand description

C++ class: QJsonDocument.

Implementations§

Source§

impl QJsonDocument

Source

pub unsafe fn array(&self) -> CppBox<QJsonArray>

Calls C++ function: QJsonArray QJsonDocument::array() const.

Source

pub unsafe fn binary_format_tag() -> c_uint

Returns the value of the BinaryFormatTag field.

Source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QJsonDocument>>, ) -> Ref<QJsonDocument>

Calls C++ function: QJsonDocument& QJsonDocument::operator=(const QJsonDocument& other).

Source

pub unsafe fn from_binary_data_2a( data: impl CastInto<Ref<QByteArray>>, validation: DataValidation, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromBinaryData(const QByteArray& data, QJsonDocument::DataValidation validation = …).

Source

pub unsafe fn from_binary_data_1a( data: impl CastInto<Ref<QByteArray>>, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromBinaryData(const QByteArray& data).

Source

pub unsafe fn from_json_2a( json: impl CastInto<Ref<QByteArray>>, error: impl CastInto<Ptr<QJsonParseError>>, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromJson(const QByteArray& json, QJsonParseError* error = …).

Source

pub unsafe fn from_json_1a( json: impl CastInto<Ref<QByteArray>>, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromJson(const QByteArray& json).

Source

pub unsafe fn from_raw_data_3a( data: *const c_char, size: c_int, validation: DataValidation, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromRawData(const char* data, int size, QJsonDocument::DataValidation validation = …).

Source

pub unsafe fn from_raw_data_2a( data: *const c_char, size: c_int, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromRawData(const char* data, int size).

Source

pub unsafe fn from_variant( variant: impl CastInto<Ref<QVariant>>, ) -> CppBox<QJsonDocument>

Calls C++ function: static QJsonDocument QJsonDocument::fromVariant(const QVariant& variant).

Source

pub unsafe fn index_q_string( &self, key: impl CastInto<Ref<QString>>, ) -> CppBox<QJsonValue>

Calls C++ function: QJsonValue QJsonDocument::operator[](const QString& key) const.

Source

pub unsafe fn index_q_string_view( &self, key: impl CastInto<Ref<QStringView>>, ) -> CppBox<QJsonValue>

Calls C++ function: QJsonValue QJsonDocument::operator[](QStringView key) const.

Source

pub unsafe fn index_q_latin1_string( &self, key: impl CastInto<Ref<QLatin1String>>, ) -> CppBox<QJsonValue>

Calls C++ function: QJsonValue QJsonDocument::operator[](QLatin1String key) const.

Source

pub unsafe fn index_int(&self, i: c_int) -> CppBox<QJsonValue>

Calls C++ function: QJsonValue QJsonDocument::operator[](int i) const.

Source

pub unsafe fn is_array(&self) -> bool

Calls C++ function: bool QJsonDocument::isArray() const.

Source

pub unsafe fn is_empty(&self) -> bool

Calls C++ function: bool QJsonDocument::isEmpty() const.

Source

pub unsafe fn is_null(&self) -> bool

Calls C++ function: bool QJsonDocument::isNull() const.

Source

pub unsafe fn is_object(&self) -> bool

Calls C++ function: bool QJsonDocument::isObject() const.

Source

pub unsafe fn new() -> CppBox<QJsonDocument>

Calls C++ function: [constructor] void QJsonDocument::QJsonDocument().

Source

pub unsafe fn from_q_json_object( object: impl CastInto<Ref<QJsonObject>>, ) -> CppBox<QJsonDocument>

Calls C++ function: [constructor] void QJsonDocument::QJsonDocument(const QJsonObject& object).

Source

pub unsafe fn from_q_json_array( array: impl CastInto<Ref<QJsonArray>>, ) -> CppBox<QJsonDocument>

Calls C++ function: [constructor] void QJsonDocument::QJsonDocument(const QJsonArray& array).

Source

pub unsafe fn new_copy( other: impl CastInto<Ref<QJsonDocument>>, ) -> CppBox<QJsonDocument>

Calls C++ function: [constructor] void QJsonDocument::QJsonDocument(const QJsonDocument& other).

Source

pub unsafe fn object(&self) -> CppBox<QJsonObject>

Calls C++ function: QJsonObject QJsonDocument::object() const.

Source

pub unsafe fn raw_data(&self, size: *mut c_int) -> *const c_char

Calls C++ function: const char* QJsonDocument::rawData(int* size) const.

Source

pub unsafe fn set_array(&self, array: impl CastInto<Ref<QJsonArray>>)

Calls C++ function: void QJsonDocument::setArray(const QJsonArray& array).

Source

pub unsafe fn set_object(&self, object: impl CastInto<Ref<QJsonObject>>)

Calls C++ function: void QJsonDocument::setObject(const QJsonObject& object).

Source

pub unsafe fn swap(&self, other: impl CastInto<Ref<QJsonDocument>>)

Calls C++ function: void QJsonDocument::swap(QJsonDocument& other).

Source

pub unsafe fn to_binary_data(&self) -> CppBox<QByteArray>

Calls C++ function: QByteArray QJsonDocument::toBinaryData() const.

Source

pub unsafe fn to_json_0a(&self) -> CppBox<QByteArray>

Calls C++ function: QByteArray QJsonDocument::toJson() const.

Source

pub unsafe fn to_json_1a(&self, format: JsonFormat) -> CppBox<QByteArray>

Calls C++ function: QByteArray QJsonDocument::toJson(QJsonDocument::JsonFormat format) const.

Source

pub unsafe fn to_variant(&self) -> CppBox<QVariant>

Calls C++ function: QVariant QJsonDocument::toVariant() const.

Trait Implementations§

Source§

impl CppDeletable for QJsonDocument

Source§

unsafe fn delete(&self)

Calls C++ function: [destructor] void QJsonDocument::~QJsonDocument().

Source§

impl PartialEq<Ref<QJsonDocument>> for QJsonDocument

Source§

fn eq(&self, other: &Ref<QJsonDocument>) -> bool

Calls C++ function: bool QJsonDocument::operator==(const QJsonDocument& other) const.

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.