pub struct PresentScalingFlags(/* private fields */);Expand description
A set of PresentScaling values.
Implementations§
Source§impl PresentScalingFlags
impl PresentScalingFlags
Sourcepub const ONE_TO_ONE: Self
pub const ONE_TO_ONE: Self
No scaling is performed; one swapchain image pixel maps to one surface pixel.
Sourcepub const ASPECT_RATIO_STRETCH: Self
pub const ASPECT_RATIO_STRETCH: Self
Both axes of the image are scaled equally, without changing the aspect ratio of the image, to the largest size in which both axes fit inside the surface.
Sourcepub const STRETCH: Self
pub const STRETCH: Self
Each axis of the image is scaled independently to fit the surface, which may change the aspect ratio of the image.
Sourcepub const fn intersects(self, other: Self) -> bool
pub const fn intersects(self, other: Self) -> bool
Returns whether any flags are set in both self and other.
Sourcepub const fn contains(self, other: Self) -> bool
pub const fn contains(self, other: Self) -> bool
Returns whether all flags in other are set in self.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection of self and other.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns self without the flags set in other.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the flags that are set in self or other, but not in both.
Sourcepub fn contains_enum(self, val: PresentScaling) -> bool
pub fn contains_enum(self, val: PresentScaling) -> bool
Returns whether self contains the flag corresponding to val.
Trait Implementations§
Source§impl BitAnd for PresentScalingFlags
impl BitAnd for PresentScalingFlags
Source§impl BitAndAssign for PresentScalingFlags
impl BitAndAssign for PresentScalingFlags
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr for PresentScalingFlags
impl BitOr for PresentScalingFlags
Source§impl BitOrAssign for PresentScalingFlags
impl BitOrAssign for PresentScalingFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXor for PresentScalingFlags
impl BitXor for PresentScalingFlags
Source§impl BitXorAssign for PresentScalingFlags
impl BitXorAssign for PresentScalingFlags
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl Clone for PresentScalingFlags
impl Clone for PresentScalingFlags
Source§fn clone(&self) -> PresentScalingFlags
fn clone(&self) -> PresentScalingFlags
Returns a duplicate 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 PresentScalingFlags
impl Debug for PresentScalingFlags
Source§impl Default for PresentScalingFlags
impl Default for PresentScalingFlags
Source§impl From<PresentScaling> for PresentScalingFlags
impl From<PresentScaling> for PresentScalingFlags
Source§fn from(val: PresentScaling) -> Self
fn from(val: PresentScaling) -> Self
Converts to this type from the input type.
Source§impl From<PresentScalingFlags> for PresentScalingFlagsEXT
impl From<PresentScalingFlags> for PresentScalingFlagsEXT
Source§fn from(val: PresentScalingFlags) -> Self
fn from(val: PresentScalingFlags) -> Self
Converts to this type from the input type.
Source§impl From<PresentScalingFlagsEXT> for PresentScalingFlags
impl From<PresentScalingFlagsEXT> for PresentScalingFlags
Source§fn from(val: PresentScalingFlagsEXT) -> Self
fn from(val: PresentScalingFlagsEXT) -> Self
Converts to this type from the input type.
Source§impl FromIterator<PresentScaling> for PresentScalingFlags
impl FromIterator<PresentScaling> for PresentScalingFlags
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = PresentScaling>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = PresentScaling>,
Creates a value from an iterator. Read more
Source§impl Hash for PresentScalingFlags
impl Hash for PresentScalingFlags
Source§impl IntoIterator for PresentScalingFlags
impl IntoIterator for PresentScalingFlags
Source§type Item = PresentScaling
type Item = PresentScaling
The type of the elements being iterated over.
Source§type IntoIter = Flatten<IntoIter<Option<<PresentScalingFlags as IntoIterator>::Item>, { $ty_bitflags::all_raw().count_ones() as usize }>>
type IntoIter = Flatten<IntoIter<Option<<PresentScalingFlags as IntoIterator>::Item>, { $ty_bitflags::all_raw().count_ones() as usize }>>
Which kind of iterator are we turning this into?
Source§impl PartialEq for PresentScalingFlags
impl PartialEq for PresentScalingFlags
Source§impl Sub for PresentScalingFlags
impl Sub for PresentScalingFlags
Source§impl SubAssign for PresentScalingFlags
impl SubAssign for PresentScalingFlags
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for PresentScalingFlags
impl Eq for PresentScalingFlags
impl StructuralPartialEq for PresentScalingFlags
Auto Trait Implementations§
impl Freeze for PresentScalingFlags
impl RefUnwindSafe for PresentScalingFlags
impl Send for PresentScalingFlags
impl Sync for PresentScalingFlags
impl Unpin for PresentScalingFlags
impl UnsafeUnpin for PresentScalingFlags
impl UnwindSafe for PresentScalingFlags
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