[−][src]Struct qt_core::QTextEncoder
The QTextEncoder class provides a state-based encoder.
C++ class: QTextEncoder
.
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(
&self,
str: impl CastInto<Ref<QString>>
) -> CppBox<QByteArray>
[src]
&self,
str: impl CastInto<Ref<QString>>
) -> CppBox<QByteArray>
Converts the Unicode string str into an encoded QByteArray.
Calls C++ function: QByteArray QTextEncoder::fromUnicode(const QString& str)
.
Converts the Unicode string str into an encoded QByteArray.
pub unsafe fn from_unicode_q_char_int(
&self,
uc: impl CastInto<Ptr<QChar>>,
len: c_int
) -> CppBox<QByteArray>
[src]
&self,
uc: impl CastInto<Ptr<QChar>>,
len: c_int
) -> CppBox<QByteArray>
This is an overloaded function.
Calls C++ function: QByteArray QTextEncoder::fromUnicode(const QChar* uc, int len)
.
This is an overloaded function.
Converts len characters (not bytes) from uc, and returns the result in a QByteArray.
pub unsafe fn from_unicode_q_string_view(
&self,
str: impl CastInto<Ref<QStringView>>
) -> CppBox<QByteArray>
[src]
&self,
str: impl CastInto<Ref<QStringView>>
) -> CppBox<QByteArray>
cpp_lib_version="5.11.3"
or cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.This is an overloaded function.
Calls C++ function: QByteArray QTextEncoder::fromUnicode(QStringView str)
.
This is an overloaded function.
Converts the Unicode string str into an encoded QByteArray.
This function was introduced in Qt 5.10.
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]
codec: impl CastInto<Ptr<QTextCodec>>
) -> CppBox<QTextEncoder>
Constructs a text encoder for the given codec.
Calls C++ function: [constructor] void QTextEncoder::QTextEncoder(const QTextCodec* codec)
.
Constructs a text encoder for the given codec.
pub unsafe fn new_2a(
codec: impl CastInto<Ptr<QTextCodec>>,
flags: QFlags<ConversionFlag>
) -> CppBox<QTextEncoder>
[src]
codec: impl CastInto<Ptr<QTextCodec>>,
flags: QFlags<ConversionFlag>
) -> CppBox<QTextEncoder>
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)
.
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]
Auto Trait Implementations
impl RefUnwindSafe for QTextEncoder
impl Send for QTextEncoder
impl Sync for QTextEncoder
impl Unpin for QTextEncoder
impl UnwindSafe for QTextEncoder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,