Skip to main content

QTextCodec

Struct QTextCodec 

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

C++ class: QTextCodec.

Implementations§

Source§

impl QTextCodec

Source

pub unsafe fn aliases(&self) -> CppBox<QListOfQByteArray>

Calls C++ function: virtual QList<QByteArray> QTextCodec::aliases() const.

Source

pub unsafe fn available_codecs() -> CppBox<QListOfQByteArray>

Calls C++ function: static QList<QByteArray> QTextCodec::availableCodecs().

Source

pub unsafe fn available_mibs() -> CppBox<QListOfInt>

Calls C++ function: static QList<int> QTextCodec::availableMibs().

Source

pub unsafe fn can_encode_q_char(&self, arg1: impl CastInto<Ref<QChar>>) -> bool

Calls C++ function: bool QTextCodec::canEncode(QChar arg1) const.

Source

pub unsafe fn can_encode_q_string( &self, arg1: impl CastInto<Ref<QString>>, ) -> bool

Calls C++ function: bool QTextCodec::canEncode(const QString& arg1) const.

Source

pub unsafe fn can_encode_q_string_view( &self, arg1: impl CastInto<Ref<QStringView>>, ) -> bool

Calls C++ function: bool QTextCodec::canEncode(QStringView arg1) const.

Source

pub unsafe fn codec_for_html_1a( ba: impl CastInto<Ref<QByteArray>>, ) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForHtml(const QByteArray& ba).

Source

pub unsafe fn codec_for_html_2a( ba: impl CastInto<Ref<QByteArray>>, default_codec: impl CastInto<Ptr<QTextCodec>>, ) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForHtml(const QByteArray& ba, QTextCodec* defaultCodec).

Source

pub unsafe fn codec_for_locale() -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForLocale().

Source

pub unsafe fn codec_for_mib(mib: c_int) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForMib(int mib).

Source

pub unsafe fn codec_for_name_q_byte_array( name: impl CastInto<Ref<QByteArray>>, ) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForName(const QByteArray& name).

Source

pub unsafe fn codec_for_name_char(name: *const c_char) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForName(const char* name).

Source

pub unsafe fn codec_for_utf_text_1a( ba: impl CastInto<Ref<QByteArray>>, ) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForUtfText(const QByteArray& ba).

Source

pub unsafe fn codec_for_utf_text_2a( ba: impl CastInto<Ref<QByteArray>>, default_codec: impl CastInto<Ptr<QTextCodec>>, ) -> Ptr<QTextCodec>

Calls C++ function: static QTextCodec* QTextCodec::codecForUtfText(const QByteArray& ba, QTextCodec* defaultCodec).

Source

pub unsafe fn from_unicode_q_string( &self, uc: impl CastInto<Ref<QString>>, ) -> CppBox<QByteArray>

Calls C++ function: QByteArray QTextCodec::fromUnicode(const QString& uc) const.

Source

pub unsafe fn from_unicode_q_string_view( &self, uc: impl CastInto<Ref<QStringView>>, ) -> CppBox<QByteArray>

Calls C++ function: QByteArray QTextCodec::fromUnicode(QStringView uc) const.

Source

pub unsafe fn make_decoder_1a( &self, flags: QFlags<ConversionFlag>, ) -> Ptr<QTextDecoder>

Calls C++ function: QTextDecoder* QTextCodec::makeDecoder(QFlags<QTextCodec::ConversionFlag> flags = …) const.

Source

pub unsafe fn make_decoder_0a(&self) -> Ptr<QTextDecoder>

Calls C++ function: QTextDecoder* QTextCodec::makeDecoder() const.

Source

pub unsafe fn make_encoder_1a( &self, flags: QFlags<ConversionFlag>, ) -> Ptr<QTextEncoder>

Calls C++ function: QTextEncoder* QTextCodec::makeEncoder(QFlags<QTextCodec::ConversionFlag> flags = …) const.

Source

pub unsafe fn make_encoder_0a(&self) -> Ptr<QTextEncoder>

Calls C++ function: QTextEncoder* QTextCodec::makeEncoder() const.

Source

pub unsafe fn mib_enum(&self) -> c_int

Calls C++ function: pure virtual int QTextCodec::mibEnum() const.

Source

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

Calls C++ function: pure virtual QByteArray QTextCodec::name() const.

Source

pub unsafe fn set_codec_for_locale(c: impl CastInto<Ptr<QTextCodec>>)

Calls C++ function: static void QTextCodec::setCodecForLocale(QTextCodec* c).

Source

pub unsafe fn to_unicode_q_byte_array( &self, arg1: impl CastInto<Ref<QByteArray>>, ) -> CppBox<QString>

Calls C++ function: QString QTextCodec::toUnicode(const QByteArray& arg1) const.

Source

pub unsafe fn to_unicode_char(&self, chars: *const c_char) -> CppBox<QString>

Calls C++ function: QString QTextCodec::toUnicode(const char* chars) const.

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.