Struct screen_13::driver::swapchain::SwapchainInfo
source · #[non_exhaustive]pub struct SwapchainInfo {
pub desired_image_count: u32,
pub height: u32,
pub surface: SurfaceFormatKHR,
pub sync_display: bool,
pub width: u32,
}
Expand description
Information used to create a Swapchain
instance.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.desired_image_count: u32
The desired, but not guaranteed, number of images that will be in the created swapchain.
More images introduces more display lag, but smoother animation.
height: u32
The initial height of the surface.
surface: SurfaceFormatKHR
The format and color space of the surface.
sync_display: bool
Determines if frames will be submitted to the display in a synchronous fashion or if they should be displayed as fast as possible instead.
Turn on to eliminate visual tearing at the expense of latency.
width: u32
The initial width of the surface.
Implementations§
source§impl SwapchainInfo
impl SwapchainInfo
sourcepub const fn new(
width: u32,
height: u32,
surface: SurfaceFormatKHR
) -> SwapchainInfo
pub const fn new( width: u32, height: u32, surface: SurfaceFormatKHR ) -> SwapchainInfo
Specifies a default swapchain with the given width
, height
and format
values.
sourcepub fn to_builder(self) -> SwapchainInfoBuilder
pub fn to_builder(self) -> SwapchainInfoBuilder
Converts a SwapchainInfo
into a SwapchainInfoBuilder
.
Trait Implementations§
source§impl Clone for SwapchainInfo
impl Clone for SwapchainInfo
source§fn clone(&self) -> SwapchainInfo
fn clone(&self) -> SwapchainInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SwapchainInfo
impl Debug for SwapchainInfo
source§impl From<SwapchainInfoBuilder> for SwapchainInfo
impl From<SwapchainInfoBuilder> for SwapchainInfo
source§fn from(info: SwapchainInfoBuilder) -> Self
fn from(info: SwapchainInfoBuilder) -> Self
Converts to this type from the input type.
source§impl Hash for SwapchainInfo
impl Hash for SwapchainInfo
source§impl PartialEq for SwapchainInfo
impl PartialEq for SwapchainInfo
source§fn eq(&self, other: &SwapchainInfo) -> bool
fn eq(&self, other: &SwapchainInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SwapchainInfo
impl Eq for SwapchainInfo
impl StructuralPartialEq for SwapchainInfo
Auto Trait Implementations§
impl RefUnwindSafe for SwapchainInfo
impl Send for SwapchainInfo
impl Sync for SwapchainInfo
impl Unpin for SwapchainInfo
impl UnwindSafe for SwapchainInfo
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.