pub struct Surface {
pub(crate) presentation: Mutex<Option<Presentation>>,
pub surface_per_backend: HashMap<Backend, Box<dyn DynSurface>>,
}
Fields§
§presentation: Mutex<Option<Presentation>>
§surface_per_backend: HashMap<Backend, Box<dyn DynSurface>>
Implementations§
source§impl Surface
impl Surface
pub fn get_capabilities( &self, adapter: &Adapter, ) -> Result<SurfaceCapabilities, GetSurfaceSupportError>
pub fn get_capabilities_with_raw( &self, adapter: &DynExposedAdapter, ) -> Result<SurfaceCapabilities, GetSurfaceSupportError>
pub fn raw(&self, backend: Backend) -> Option<&dyn DynSurface>
source§impl Surface
impl Surface
pub fn get_current_texture(&self) -> Result<ResolvedSurfaceOutput, SurfaceError>
pub fn present(&self) -> Result<Status, SurfaceError>
pub fn discard(&self) -> Result<(), SurfaceError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Surface
impl !RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl !UnwindSafe for Surface
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