Function gdk4::content_deserialize_async

source ·
pub fn content_deserialize_async<R: FnOnce(Result<Value, Error>) + 'static>(
    stream: &impl IsA<InputStream>,
    mime_type: &str,
    type_: Type,
    io_priority: Priority,
    cancellable: Option<&impl IsA<Cancellable>>,
    callback: R
Expand description

Read content from the given input stream and deserialize it, asynchronously.

The default I/O priority is G_PRIORITY_DEFAULT (i.e. 0), and lower numbers indicate a higher priority.

When the operation is finished, @callback will be called. You must then call content_deserialize_finish() to get the result of the operation.


a GInputStream to read the serialized content from


the mime type to deserialize from


the GType to deserialize from


the I/O priority of the operation


optional GCancellable object


callback to call when the operation is done