Struct gfx_hal::image::SubresourceRange
source · [−]pub struct SubresourceRange {
pub aspects: Aspects,
pub level_start: Level,
pub level_count: Option<Level>,
pub layer_start: Layer,
pub layer_count: Option<Layer>,
}
Expand description
A subset of resources contained within an image.
Fields
aspects: Aspects
Included aspects: color/depth/stencil
level_start: Level
First mipmap level in this subresource
level_count: Option<Level>
Number of sequential levels in this subresource.
A value of None
indicates the subresource contains
all of the remaining levels.
layer_start: Layer
First layer in this subresource
layer_count: Option<Layer>
Number of sequential layers in this subresource.
A value of None
indicates the subresource contains
all of the remaining layers.
Implementations
sourceimpl SubresourceRange
impl SubresourceRange
sourcepub fn resolve_level_count(&self, total: Level) -> Level
pub fn resolve_level_count(&self, total: Level) -> Level
Resolve the concrete level count based on the total number of layers in an image.
sourcepub fn resolve_layer_count(&self, total: Layer) -> Layer
pub fn resolve_layer_count(&self, total: Layer) -> Layer
Resolve the concrete layer count based on the total number of layer in an image.
Trait Implementations
sourceimpl Clone for SubresourceRange
impl Clone for SubresourceRange
sourcefn clone(&self) -> SubresourceRange
fn clone(&self) -> SubresourceRange
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubresourceRange
impl Debug for SubresourceRange
sourceimpl Default for SubresourceRange
impl Default for SubresourceRange
sourcefn default() -> SubresourceRange
fn default() -> SubresourceRange
Returns the “default value” for a type. Read more
sourceimpl From<SubresourceLayers> for SubresourceRange
impl From<SubresourceLayers> for SubresourceRange
sourcefn from(sub: SubresourceLayers) -> Self
fn from(sub: SubresourceLayers) -> Self
Performs the conversion.
sourceimpl Hash for SubresourceRange
impl Hash for SubresourceRange
sourceimpl PartialEq<SubresourceRange> for SubresourceRange
impl PartialEq<SubresourceRange> for SubresourceRange
sourcefn eq(&self, other: &SubresourceRange) -> bool
fn eq(&self, other: &SubresourceRange) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SubresourceRange) -> bool
fn ne(&self, other: &SubresourceRange) -> bool
This method tests for !=
.
impl Eq for SubresourceRange
impl StructuralEq for SubresourceRange
impl StructuralPartialEq for SubresourceRange
Auto Trait Implementations
impl RefUnwindSafe for SubresourceRange
impl Send for SubresourceRange
impl Sync for SubresourceRange
impl Unpin for SubresourceRange
impl UnwindSafe for SubresourceRange
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more