Struct imgui::SuspendedContext[][src]

pub struct SuspendedContext(_);
Expand description

A suspended imgui-rs context.

A suspended context retains its state, but is not usable without activating it first.

Examples

Suspended contexts are not directly very useful, but you can activate them:

let suspended = imgui::SuspendedContext::create();
match suspended.activate() {
  Ok(ctx) => {
    // ctx is now the active context
  },
  Err(suspended) => {
    // activation failed, so you get the suspended context back
  }
}

Implementations

Creates a new suspended imgui-rs context.

Creates a new suspended imgui-rs context with a shared font atlas.

Attempts to activate this suspended context.

If there is no active context, this suspended context is activated and Ok is returned, containing the activated context. If there is already an active context, nothing happens and Err is returned, containing the original suspended context.

Trait Implementations

Formats the value using the given formatter. Read more

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 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.