[][src]Struct qt_core::QTextEncoder

#[repr(C)]
pub struct QTextEncoder { /* fields omitted */ }

The QTextEncoder class provides a state-based encoder.

C++ class: QTextEncoder.

C++ documentation:

The QTextEncoder class provides a state-based encoder.

A text encoder converts text from Unicode into an encoded text format using a specific codec.

The encoder converts Unicode into another format, remembering any state that is required between calls.

Methods

impl QTextEncoder[src]

pub unsafe fn from_unicode_q_string(
    &mut self,
    str: impl CastInto<Ref<QString>>
) -> CppBox<QByteArray>
[src]

Converts the Unicode string str into an encoded QByteArray.

Calls C++ function: QByteArray QTextEncoder::fromUnicode(const QString& str).

C++ documentation:

Converts the Unicode string str into an encoded QByteArray.

pub unsafe fn from_unicode_q_char_int(
    &mut self,
    uc: impl CastInto<Ptr<QChar>>,
    len: c_int
) -> CppBox<QByteArray>
[src]

This is an overloaded function.

Calls C++ function: QByteArray QTextEncoder::fromUnicode(const QChar* uc, int len).

C++ documentation:

This is an overloaded function.

Converts len characters (not bytes) from uc, and returns the result in a QByteArray.

pub unsafe fn has_failure(&self) -> bool[src]

Calls C++ function: bool QTextEncoder::hasFailure() const.

pub unsafe fn new_1a(
    codec: impl CastInto<Ptr<QTextCodec>>
) -> CppBox<QTextEncoder>
[src]

Constructs a text encoder for the given codec.

Calls C++ function: [constructor] void QTextEncoder::QTextEncoder(const QTextCodec* codec).

C++ documentation:

Constructs a text encoder for the given codec.

pub unsafe fn new_2a(
    codec: impl CastInto<Ptr<QTextCodec>>,
    flags: QFlags<ConversionFlag>
) -> CppBox<QTextEncoder>
[src]

Constructs a text encoder for the given codec and conversion flags.

Calls C++ function: [constructor] void QTextEncoder::QTextEncoder(const QTextCodec* codec, QFlags<QTextCodec::ConversionFlag> flags).

C++ documentation:

Constructs a text encoder for the given codec and conversion flags.

This function was introduced in Qt 4.7.

Trait Implementations

impl CppDeletable for QTextEncoder[src]

unsafe fn delete(&mut self)[src]

Destroys the encoder.

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

C++ documentation:

Destroys the encoder.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]