Struct show_image::ContextHandle[][src]

pub struct ContextHandle<'a> { /* fields omitted */ }
Expand description

Handle to the global context.

You can interact with the global context through a ContextHandle only from the global context thread. To interact with the context from a different thread, use a ContextProxy.

Implementations

Get a proxy for the context to interact with it from a different thread.

You should not use proxy objects from withing the global context thread. The proxy objects often wait for the global context to perform some action. Doing so from within the global context thread would cause a deadlock.

Exit the program when the last window closes.

Get a window handle for the given window ID.

Create a new window.

Add a global event handler.

Run a task in a background thread and register it with the context.

The task will be executed in a different thread than the context. Currently, each task is spawned in a separate thread. In the future, tasks may be run in a dedicated thread pool.

The background task will be joined before the process is terminated when you use Self::exit() or one of the other exit functions of this crate.

Join all background tasks and then exit the process.

If you use std::process::exit, running background tasks may be killed. To ensure no data loss occurs, you should use this function instead.

Background tasks are spawned when an image is saved through the built-in Ctrl+S or Ctrl+Shift+S shortcut, or by user code.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.