pub trait Surface<D: Device>: Sized {
type Frame: SurfaceFrame<D>;
// Required methods
fn configure(&mut self, device: &D, config: &SurfaceConfig);
fn config(&self) -> &SurfaceConfig;
fn acquire(&mut self) -> Result<Self::Frame, SurfaceError>;
}Expand description
A presentation surface bound to a window.
Required Associated Types§
Sourcetype Frame: SurfaceFrame<D>
type Frame: SurfaceFrame<D>
The acquired-frame type.
Required Methods§
Sourcefn configure(&mut self, device: &D, config: &SurfaceConfig)
fn configure(&mut self, device: &D, config: &SurfaceConfig)
(Re)configures for the given size; called on open and on resize.
Sourcefn config(&self) -> &SurfaceConfig
fn config(&self) -> &SurfaceConfig
The current configuration.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".