#[non_exhaustive]pub enum WinitPlatformError {
Show 32 variants
Attachment(ContextAttachmentError),
PlatformAttachmentRelease(ContextPlatformAttachmentReleaseError),
Context(ContextBindingError),
PlatformWindowTeardown(ContextPlatformWindowTeardownError),
ContextMismatch,
PlatformStateOccupied {
field: &'static str,
},
PlatformStateReplaced {
field: &'static str,
},
WindowNotAttached,
WindowMismatch,
RuntimeAlreadyAttached,
RuntimeConfigurationLocked,
AggregateCallbackHooksUnavailable,
PlatformCallbackOccupied {
callback: &'static str,
},
PlatformCapabilityOccupied {
flag: &'static str,
},
PlatformCallbackReplaced {
callback: &'static str,
},
RendererShutdownRequired {
field: &'static str,
},
ForeignPlatformUserData,
ViewportOwnershipLost {
viewport_id: u32,
field: &'static str,
},
NoMonitors,
InvalidMonitorGeometry {
monitor: usize,
reason: &'static str,
},
InvalidViewportGeometry {
operation: &'static str,
reason: &'static str,
},
CustomHiDpiModeUnsupported,
WaylandUnsupported,
UnsupportedWindowSystem {
target: &'static str,
},
UnsupportedViewportFlag {
flag: &'static str,
operation: &'static str,
},
MonitorCountOverflow,
MonitorStorageAllocationFailed,
EventLoopUnavailable,
WindowCreation {
message: String,
},
WindowOperation {
operation: &'static str,
message: String,
},
CallbackPanicked {
callback: &'static str,
},
RuntimeDetached,
}Expand description
Failure to attach or operate the Winit platform backend.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Attachment(ContextAttachmentError)
The Dear ImGui Context rejected the platform attachment.
PlatformAttachmentRelease(ContextPlatformAttachmentReleaseError)
The Context rejected release of the active platform attachment generation.
Context(ContextBindingError)
The originating Dear ImGui Context can no longer be entered normally.
PlatformWindowTeardown(ContextPlatformWindowTeardownError)
Dear ImGui rejected an explicit platform-window teardown transaction.
ContextMismatch
The supplied Context is not the Context owned by this platform backend.
PlatformStateOccupied
Another platform backend already owns a required global field.
PlatformStateReplaced
A field claimed by this platform backend changed while it remained attached.
WindowNotAttached
No main window has been attached to the platform backend.
WindowMismatch
The supplied window is not the platform backend’s attached main window.
RuntimeAlreadyAttached
Multi-viewport support is already attached to this platform owner.
RuntimeConfigurationLocked
A configuration mutation would invalidate the active multi-viewport coordinate contract.
The build artifact lacks the aggregate callback bridge required by this backend.
PlatformCallbackOccupied
Another platform backend already owns one of the required callback slots.
PlatformCapabilityOccupied
Another platform backend already advertises a capability owned by this runtime.
PlatformCallbackReplaced
A slot in the captured platform callback table changed while the runtime remained attached.
RendererShutdownRequired
Platform teardown was requested before the renderer released its viewport callback.
ForeignPlatformUserData
A viewport already has platform data owned by another backend.
ViewportOwnershipLost
A live viewport stopped matching the Winit platform data registered for it.
Fields
NoMonitors
Winit did not expose any monitor geometry that can back Dear ImGui viewports.
InvalidMonitorGeometry
Winit exposed monitor geometry that violates Dear ImGui’s platform contract.
InvalidViewportGeometry
Dear ImGui supplied viewport geometry that cannot be represented by Winit.
CustomHiDpiModeUnsupported
Custom single-window coordinate scaling is not implemented for platform viewports.
WaylandUnsupported
Wayland cannot provide the desktop-space positioning required by Dear ImGui viewports.
UnsupportedWindowSystem
The target has no supported native desktop window-system contract.
UnsupportedViewportFlag
A requested viewport flag cannot be implemented faithfully for this operation.
MonitorCountOverflow
The monitor count cannot be represented by Dear ImGui’s native vector.
MonitorStorageAllocationFailed
Dear ImGui’s allocator could not reserve monitor storage.
Dear ImGui requested a new viewport outside a scoped Winit event-loop entry.
WindowCreation
Winit failed to create a secondary viewport window.
WindowOperation
A fallible operation on a secondary Winit window failed.
CallbackPanicked
A Rust platform callback panicked; the panic was contained at the C ABI boundary.
RuntimeDetached
The owning runtime has already shut down or entered a terminal fault.
Trait Implementations§
Source§impl Clone for WinitPlatformError
impl Clone for WinitPlatformError
Source§fn clone(&self) -> WinitPlatformError
fn clone(&self) -> WinitPlatformError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WinitPlatformError
impl Debug for WinitPlatformError
Source§impl Display for WinitPlatformError
impl Display for WinitPlatformError
impl Eq for WinitPlatformError
Source§impl Error for WinitPlatformError
impl Error for WinitPlatformError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ContextAttachmentError> for WinitPlatformError
impl From<ContextAttachmentError> for WinitPlatformError
Source§fn from(source: ContextAttachmentError) -> Self
fn from(source: ContextAttachmentError) -> Self
Source§impl From<ContextBindingError> for WinitPlatformError
impl From<ContextBindingError> for WinitPlatformError
Source§fn from(source: ContextBindingError) -> Self
fn from(source: ContextBindingError) -> Self
Source§impl From<ContextPlatformAttachmentReleaseError> for WinitPlatformError
impl From<ContextPlatformAttachmentReleaseError> for WinitPlatformError
Source§fn from(source: ContextPlatformAttachmentReleaseError) -> Self
fn from(source: ContextPlatformAttachmentReleaseError) -> Self
Source§impl From<ContextPlatformWindowTeardownError> for WinitPlatformError
impl From<ContextPlatformWindowTeardownError> for WinitPlatformError
Source§fn from(source: ContextPlatformWindowTeardownError) -> Self
fn from(source: ContextPlatformWindowTeardownError) -> Self
Source§impl PartialEq for WinitPlatformError
impl PartialEq for WinitPlatformError
impl StructuralPartialEq for WinitPlatformError
Auto Trait Implementations§
impl Freeze for WinitPlatformError
impl RefUnwindSafe for WinitPlatformError
impl Send for WinitPlatformError
impl Sync for WinitPlatformError
impl Unpin for WinitPlatformError
impl UnsafeUnpin for WinitPlatformError
impl UnwindSafe for WinitPlatformError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.