[−][src]Struct qt_core::QTextDecoder
The QTextDecoder class provides a state-based decoder.
C++ class: QTextDecoder
.
The QTextDecoder class provides a state-based decoder.
A text decoder converts text from an encoded text format into Unicode using a specific codec.
The decoder converts text in this format into Unicode, remembering any state that is required between calls.
Methods
impl QTextDecoder
[src]
pub unsafe fn has_failure(&self) -> bool
[src]
Calls C++ function: bool QTextDecoder::hasFailure() const
.
pub unsafe fn needs_more_data(&self) -> bool
[src]
Calls C++ function: bool QTextDecoder::needsMoreData() const
.
This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0", cpp_lib_version="5.14.0")
.
pub unsafe fn new_1a(
codec: impl CastInto<Ptr<QTextCodec>>
) -> CppBox<QTextDecoder>
[src]
codec: impl CastInto<Ptr<QTextCodec>>
) -> CppBox<QTextDecoder>
Constructs a text decoder for the given codec.
Calls C++ function: [constructor] void QTextDecoder::QTextDecoder(const QTextCodec* codec)
.
Constructs a text decoder for the given codec.
pub unsafe fn new_2a(
codec: impl CastInto<Ptr<QTextCodec>>,
flags: QFlags<ConversionFlag>
) -> CppBox<QTextDecoder>
[src]
codec: impl CastInto<Ptr<QTextCodec>>,
flags: QFlags<ConversionFlag>
) -> CppBox<QTextDecoder>
Constructs a text decoder for the given codec and conversion flags.
Calls C++ function: [constructor] void QTextDecoder::QTextDecoder(const QTextCodec* codec, QFlags<QTextCodec::ConversionFlag> flags)
.
Constructs a text decoder for the given codec and conversion flags.
This function was introduced in Qt 4.7.
pub unsafe fn to_unicode_2a(
&mut self,
chars: impl CastInto<Ptr<c_char>>,
len: c_int
) -> CppBox<QString>
[src]
&mut self,
chars: impl CastInto<Ptr<c_char>>,
len: c_int
) -> CppBox<QString>
Converts the first len bytes in chars to Unicode, returning the result.
Calls C++ function: QString QTextDecoder::toUnicode(const char* chars, int len)
.
Converts the first len bytes in chars to Unicode, returning the result.
If not all characters are used (e.g. if only part of a multi-byte encoding is at the end of the characters), the decoder remembers enough state to continue with the next call to this function.
pub unsafe fn to_unicode_1a(
&mut self,
ba: impl CastInto<Ref<QByteArray>>
) -> CppBox<QString>
[src]
&mut self,
ba: impl CastInto<Ref<QByteArray>>
) -> CppBox<QString>
This is an overloaded function.
Calls C++ function: QString QTextDecoder::toUnicode(const QByteArray& ba)
.
This is an overloaded function.
Converts the bytes in the byte array specified by ba to Unicode and returns the result.
pub unsafe fn to_unicode_3a(
&mut self,
target: impl CastInto<MutPtr<QString>>,
chars: impl CastInto<Ptr<c_char>>,
len: c_int
)
[src]
&mut self,
target: impl CastInto<MutPtr<QString>>,
chars: impl CastInto<Ptr<c_char>>,
len: c_int
)
This is an overloaded function.
Calls C++ function: void QTextDecoder::toUnicode(QString* target, const char* chars, int len)
.
This is an overloaded function.
The converted string is returned in target.
Trait Implementations
impl CppDeletable for QTextDecoder
[src]
Auto Trait Implementations
impl RefUnwindSafe for QTextDecoder
impl Send for QTextDecoder
impl Sync for QTextDecoder
impl Unpin for QTextDecoder
impl UnwindSafe for QTextDecoder
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]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<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>,