Function gdk4::content_deserialize_async [−][src]
pub fn content_deserialize_async<P: IsA<InputStream>, Q: IsA<Cancellable>, R: FnOnce(Result<Value, Error>) + Send + 'static>(
stream: &P,
mime_type: &str,
type_: Type,
io_priority: Priority,
cancellable: Option<&Q>,
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.
stream
a GInputStream
to read the serialized content from
mime_type
the mime type to deserialize from
type_
the GType to deserialize from
io_priority
the I/O priority of the operation
cancellable
optional GCancellable
object
callback
callback to call when the operation is done