#[non_exhaustive]pub enum PlatformError {
NoPlatform,
NoEventLoopProvider,
SetPlatformError(SetPlatformError),
Unsupported,
Other(String),
OtherError(Box<dyn Error + Send + Sync>),
}Expand description
The platform encountered a fatal error.
This error typically indicates an issue with initialization or connecting to the windowing system.
This can be constructed from a String:
use slint::platform::PlatformError;
PlatformError::from(format!("Could not load resource {}", 1234));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoPlatform
No default platform was selected, or no platform could be initialized.
If you encounter this error, make sure to either selected trough the backend-* cargo features flags,
or call platform::set_platform()
before running the event loop
NoEventLoopProvider
The Slint Platform does not provide an event loop.
The Platform::run_event_loop
is not implemented for the current platform.
SetPlatformError(SetPlatformError)
There is already a platform set from another thread.
Unsupported
The operation is not supported by the current platform.
Other(String)
Another platform-specific error occurred
OtherError(Box<dyn Error + Send + Sync>)
std only.Another platform-specific error occurred.
Trait Implementations§
Source§impl Debug for PlatformError
impl Debug for PlatformError
Source§impl Display for PlatformError
impl Display for PlatformError
Source§impl Error for PlatformError
Available on crate feature std only.
impl Error for PlatformError
std only.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<&str> for PlatformError
impl From<&str> for PlatformError
Auto Trait Implementations§
impl Freeze for PlatformError
impl !RefUnwindSafe for PlatformError
impl Send for PlatformError
impl Sync for PlatformError
impl Unpin for PlatformError
impl UnsafeUnpin for PlatformError
impl !UnwindSafe for PlatformError
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
SharedString.