gio::prelude

Trait ConverterExt

Source
pub trait ConverterExt: IsA<Converter> + 'static {
    // Provided methods
    fn convert_bytes(&self, bytes: &Bytes) -> Result<Bytes, Error> { ... }
    fn reset(&self) { ... }
}
Expand description

Trait containing all Converter methods.

§Implementors

CharsetConverter, Converter, ZlibCompressor, ZlibDecompressor

Provided Methods§

Source

fn convert_bytes(&self, bytes: &Bytes) -> Result<Bytes, Error>

Available on crate feature v2_82 only.

Applies @self to the data in @bytes.

§bytes

the data to convert

§Returns

A newly-allocated GBytes with the converted data, or NULL if an error occurred

Source

fn reset(&self)

Resets all internal state in the converter, making it behave as if it was just created. If the converter has any internal state that would produce output then that output is lost.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§