pub struct SwapChain { /* private fields */ }
Expand description
Handle to a swap chain.
A SwapChain
represents the image or series of images that will be presented to a Surface
.
A SwapChain
may be created with Device::create_swap_chain
.
Implementations§
Source§impl SwapChain
impl SwapChain
Sourcepub fn get_next_frame(&mut self) -> Result<SwapChainFrame, SwapChainError>
pub fn get_next_frame(&mut self) -> Result<SwapChainFrame, SwapChainError>
Returns the next texture to be presented by the swapchain for drawing.
When the SwapChainFrame
returned by this method is dropped, the swapchain will present
the texture to the associated Surface
.
If a SwapChainFrame referencing this surface is alive when the swapchain is recreated, recreating the swapchain will panic.
Auto Trait Implementations§
impl Freeze for SwapChain
impl !RefUnwindSafe for SwapChain
impl Send for SwapChain
impl Sync for SwapChain
impl Unpin for SwapChain
impl !UnwindSafe for SwapChain
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