Struct imgui::SuspendedContext [−][src]
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
impl SuspendedContext
[src]
pub fn create() -> Self
[src]
Creates a new suspended imgui-rs context.
pub fn create_with_shared_font_atlas(
shared_font_atlas: Rc<RefCell<SharedFontAtlas>>
) -> Self
[src]
shared_font_atlas: Rc<RefCell<SharedFontAtlas>>
) -> Self
Creates a new suspended imgui-rs context with a shared font atlas.
pub fn activate(self) -> Result<Context, SuspendedContext>
[src]
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
Auto Trait Implementations
impl !RefUnwindSafe for SuspendedContext
[src]
impl !Send for SuspendedContext
[src]
impl !Sync for SuspendedContext
[src]
impl Unpin for SuspendedContext
[src]
impl !UnwindSafe for SuspendedContext
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,