Struct qt_core::QCborKnownTags

source ·
pub struct QCborKnownTags(/* private fields */);
Expand description

This enum contains a list of CBOR tags, known at the time of the Qt implementation. This list is not meant to be complete and contains only tags that are either backed by an RFC or specifically used by the Qt implementation.

C++ enum: QCborKnownTags.

C++ documentation:

This enum contains a list of CBOR tags, known at the time of the Qt implementation. This list is not meant to be complete and contains only tags that are either backed by an RFC or specifically used by the Qt implementation.

The authoritative list is maintained by IANA in the CBOR tag registry.

The following tags are interpreted by QCborValue during decoding and will produce objects with extended Qt types, and it will use those tags when encoding the same extended types.

Additionally, if a QCborValue containing a QByteArray is tagged using one of ExpectedBase64url, ExpectedBase64 or ExpectedBase16, QCborValue will use the expected encoding when converting to JSON (see QCborValue::toJsonValue).

See also QCborTag, QCborStreamWriter::append(QCborTag), QCborStreamReader::isTag(), QCborStreamReader::toTag(), QCborValue::isTag(), and QCborValue::tag().

Implementations§

source§

impl QCborKnownTags

source

pub fn to_int(&self) -> c_int

source§

impl QCborKnownTags

source

pub const DateTimeString: QCborKnownTags = _

A date and time string, formatted according to RFC 3339, as refined by RFC 4287. It is the same format as Qt::ISODate and Qt::ISODateWithMs. (C++ enum variant: DateTimeString = 0)

source

pub const UnixTimeT: QCborKnownTags = _

A numerical representation of seconds elapsed since 1970-01-01T00:00Z. (C++ enum variant: UnixTime_t = 1)

source

pub const PositiveBignum: QCborKnownTags = _

A positive number of arbitrary length, encoded as a byte array in network byte order. For example, the number 264 is represented by a byte array containing the byte value 0x01 followed by 8 zero bytes. (C++ enum variant: PositiveBignum = 2)

source

pub const NegativeBignum: QCborKnownTags = _

A negative number of arbirary length, encoded as the absolute value of that number, minus one. For example, a byte array containing byte value 0x02 followed by 8 zero bytes represents the number -265 - 1. (C++ enum variant: NegativeBignum = 3)

source

pub const Decimal: QCborKnownTags = _

A decimal fraction, encoded as an array of two integers: the first is the exponent of the power of 10, the second the integral mantissa. The value 273.15 would be encoded as array [-2, 27315]. (C++ enum variant: Decimal = 4)

source

pub const Bigfloat: QCborKnownTags = _

Similar to Decimal, but the exponent is a power of 2 instead. (C++ enum variant: Bigfloat = 5)

source

pub const COSEEncrypt0: QCborKnownTags = _

An Encrypt0 map as specified by RFC 8152 (CBOR Object Signing and Encryption). (C++ enum variant: COSE_Encrypt0 = 16)

source

pub const COSEMac0: QCborKnownTags = _

A Mac0 map as specified by RFC 8152 (CBOR Object Signing and Encryption). (C++ enum variant: COSE_Mac0 = 17)

source

pub const COSESign1: QCborKnownTags = _

A Sign1 map as specified by RFC 8152 (CBOR Object Signing and Encryption). (C++ enum variant: COSE_Sign1 = 18)

source

pub const ExpectedBase64URL: QCborKnownTags = _

Indicates that the byte array should be encoded using Base64url if the stream is converted to JSON. (C++ enum variant: ExpectedBase64url = 21)

source

pub const ExpectedBase64: QCborKnownTags = _

Indicates that the byte array should be encoded using Base64 if the stream is converted to JSON. (C++ enum variant: ExpectedBase64 = 22)

source

pub const ExpectedBase16: QCborKnownTags = _

Indicates that the byte array should be encoded using Base16 (hex) if the stream is converted to JSON. (C++ enum variant: ExpectedBase16 = 23)

source

pub const EncodedCbor: QCborKnownTags = _

Indicates that the byte array contains a CBOR stream. (C++ enum variant: EncodedCbor = 24)

source

pub const Url: QCborKnownTags = _

Indicates that the string contains a URL. (C++ enum variant: Url = 32)

source

pub const Base64URL: QCborKnownTags = _

Indicates that the string contains data encoded using Base64url. (C++ enum variant: Base64url = 33)

source

pub const Base64: QCborKnownTags = _

Indicates that the string contains data encoded using Base64. (C++ enum variant: Base64 = 34)

source

pub const RegularExpression: QCborKnownTags = _

Indicates that the string contains a Perl-Compatible Regular Expression pattern. (C++ enum variant: RegularExpression = 35)

source

pub const MimeMessage: QCborKnownTags = _

Indicates that the string contains a MIME message (according to https://tools.ietf.org/html/rfc2045){RFC 2045}. (C++ enum variant: MimeMessage = 36)

source

pub const Uuid: QCborKnownTags = _

Indicates that the byte array contains a UUID. (C++ enum variant: Uuid = 37)

source

pub const COSEEncrypt: QCborKnownTags = _

An Encrypt map as specified by RFC 8152 (CBOR Object Signing and Encryption). (C++ enum variant: COSE_Encrypt = 96)

source

pub const COSEMac: QCborKnownTags = _

A Mac map as specified by RFC 8152 (CBOR Object Signing and Encryption). (C++ enum variant: COSE_Mac = 97)

source

pub const COSESign: QCborKnownTags = _

A Sign map as specified by RFC 8152 (CBOR Object Signing and Encryption). (C++ enum variant: COSE_Sign = 98)

source

pub const Signature: QCborKnownTags = _

No change in interpretation; this tag can be used as the outermost tag in a CBOR stream as the file header. (C++ enum variant: Signature = 55799)

Trait Implementations§

source§

impl Clone for QCborKnownTags

source§

fn clone(&self) -> QCborKnownTags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for QCborKnownTags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<QCborKnownTags> for c_int

source§

fn from(value: QCborKnownTags) -> Self

Converts to this type from the input type.
source§

impl From<i32> for QCborKnownTags

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for QCborKnownTags

source§

fn eq(&self, other: &QCborKnownTags) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Shl<QCborKnownTags> for &QDebug

Available on cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.
source§

fn shl(self, tg: QCborKnownTags) -> CppBox<QDebug>

Writes bit array ba to stream out.

Calls C++ function: QDebug operator<<(QDebug arg1, QCborKnownTags tg).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for QDataStream &operator<<(QDataStream &out, const QBitArray &ba):

Writes bit array ba to stream out.

See also Format of the QDataStream operators.

§

type Output = CppBox<QDebug>

The resulting type after applying the << operator.
source§

impl Copy for QCborKnownTags

source§

impl Eq for QCborKnownTags

source§

impl StructuralEq for QCborKnownTags

source§

impl StructuralPartialEq for QCborKnownTags

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.