pub struct SuspendedContext(/* private fields */);Expand description
A suspended Dear ImGui context
A suspended context retains its state, but is not usable without activating it first.
Implementations§
Source§impl SuspendedContext
impl SuspendedContext
Sourcepub fn try_create() -> ImGuiResult<Self>
pub fn try_create() -> ImGuiResult<Self>
Tries to create a new suspended Dear ImGui context
Tries to create a new suspended Dear ImGui context with a shared font atlas
Creates a new suspended Dear ImGui context with a shared font atlas (panics on error)
Sourcepub fn activate(self) -> Result<Context, SuspendedContext>
pub fn activate(self) -> Result<Context, SuspendedContext>
Attempts to activate this suspended context
If there is no active context, this suspended context is activated and Ok is returned.
If there is already an active context, nothing happens and Err is returned.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SuspendedContext
impl !RefUnwindSafe for SuspendedContext
impl !Send for SuspendedContext
impl !Sync for SuspendedContext
impl Unpin for SuspendedContext
impl !UnwindSafe for SuspendedContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more