#[non_exhaustive]pub enum ContextScopeError {
Activation(ContextActivationReason),
FrameLeftOpen,
ContextUnavailable(ContextBindingError),
}Expand description
Failure to enter or finish a temporary active-Context scope.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Activation(ContextActivationReason)
The Context could not be made current before the closure ran.
FrameLeftOpen
The closure returned success while leaving a Dear ImGui frame open.
The Context became unavailable while entering its binding capability.
Safe ownership normally keeps the Context available. This variant preserves a binding failure caused by teardown or raw/unsafe lifecycle interference instead of panicking.
Implementations§
Source§impl ContextScopeError
impl ContextScopeError
Sourcepub fn activation_reason(self) -> Option<ContextActivationReason>
pub fn activation_reason(self) -> Option<ContextActivationReason>
Returns the activation rejection reason, if the closure was not entered.
Trait Implementations§
Source§impl Clone for ContextScopeError
impl Clone for ContextScopeError
Source§fn clone(&self) -> ContextScopeError
fn clone(&self) -> ContextScopeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ContextScopeError
Source§impl Debug for ContextScopeError
impl Debug for ContextScopeError
Source§impl Display for ContextScopeError
impl Display for ContextScopeError
impl Eq for ContextScopeError
Source§impl Error for ContextScopeError
impl Error for ContextScopeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<E> From<ContextScopeError> for ScopedActivationError<E>
impl<E> From<ContextScopeError> for ScopedActivationError<E>
Source§fn from(error: ContextScopeError) -> Self
fn from(error: ContextScopeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ContextScopeError
impl PartialEq for ContextScopeError
impl StructuralPartialEq for ContextScopeError
Auto Trait Implementations§
impl Freeze for ContextScopeError
impl RefUnwindSafe for ContextScopeError
impl Send for ContextScopeError
impl Sync for ContextScopeError
impl Unpin for ContextScopeError
impl UnsafeUnpin for ContextScopeError
impl UnwindSafe for ContextScopeError
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