Function gdk4::content_serialize_async[][src]

pub fn content_serialize_async<P: IsA<OutputStream>, Q: IsA<Cancellable>, R: FnOnce(Result<(), Error>) + Send + 'static>(
    stream: &P,
    mime_type: &str,
    value: &Value,
    io_priority: Priority,
    cancellable: Option<&Q>,
    callback: R
)
Expand description

Serialize content and write it to the given output stream, 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_serialize_finish() to get the result of the operation.

stream

a GOutputStream to write the serialized content to

mime_type

the mime type to serialize to

value

the content to serialize

io_priority

the I/O priority of the operation

cancellable

optional GCancellable object

callback

callback to call when the operation is done