pub trait DesktopFrameBackend {
// Required method
fn run_frame(&self, frame: DesktopFrame) -> Result<()>;
// Provided method
fn capabilities(&self) -> DesktopFrameCapabilities { ... }
}Expand description
Native desktop frame backend contract.
Platform modules implement this trait so app code can use one API regardless of target OS. Backend-specific code should stay inside the platform module.
Required Methods§
Sourcefn run_frame(&self, frame: DesktopFrame) -> Result<()>
fn run_frame(&self, frame: DesktopFrame) -> Result<()>
Run the desktop frame until the native app exits.
Call this through run_frame_with so capability validation happens
before ownership is transferred to the backend.
§Errors
Returns an error if the native shell cannot initialize or exits with a platform-specific failure.
Provided Methods§
Sourcefn capabilities(&self) -> DesktopFrameCapabilities
fn capabilities(&self) -> DesktopFrameCapabilities
Return the shell capabilities supported by this backend.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".