module Gio::Converter

Overview

GConverter is an interface for streaming conversions.

GConverter is implemented by objects that convert binary data in various ways. The conversion can be stateful and may fail at any place.

Some example conversions are: character set conversion, compression, decompression and regular expression replace.

Direct including types

Defined in:

lib/gi-crystal/src/auto/gio-2.0/converter.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.cast(obj : GObject::Object) : self #

Cast a GObject::Object to self, throws a TypeCastError if the cast can't be made.


Class Method Detail

def self.cast?(obj : GObject::Object) : self | Nil #

def self.g_type : UInt64 #

Instance Method Detail

def convert(inbuf : Bytes, outbuf : Bytes, flags : Gio::ConverterFlags, bytes_read : UInt64, bytes_written : UInt64) : Gio::ConverterResult #

def convert_bytes(bytes : GLib::Bytes) : GLib::Bytes #

def reset : Nil #

abstract def to_unsafe #