Expand description
Specifies the kind of an image to be allocated.
Variants
D1(Size, Layer)
A single one-dimensional row of texels.
D2(Size, Size, Layer, NumSamples)
Two-dimensional image.
D3(Size, Size, Size)
Volumetric image.
Implementations
sourceimpl Kind
impl Kind
sourcepub fn level_extent(&self, level: Level) -> Extent
pub fn level_extent(&self, level: Level) -> Extent
Get the extent of a particular mipmap level.
sourcepub fn num_levels(&self) -> Level
pub fn num_levels(&self) -> Level
Count the number of mipmap levels.
sourcepub fn num_layers(&self) -> Layer
pub fn num_layers(&self) -> Layer
Return the number of layers in an array type.
Each cube face counts as separate layer.
sourcepub fn num_samples(&self) -> NumSamples
pub fn num_samples(&self) -> NumSamples
Return the number of MSAA samples for the kind.
Trait Implementations
sourceimpl Ord for Kind
impl Ord for Kind
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Kind> for Kind
impl PartialOrd<Kind> for Kind
sourcefn partial_cmp(&self, other: &Kind) -> Option<Ordering>
fn partial_cmp(&self, other: &Kind) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Kind
impl Eq for Kind
impl StructuralEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more