pub struct VolumeDescriptor { /* private fields */ }
Implementations§
Source§impl VolumeDescriptor
impl VolumeDescriptor
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn depth(&self) -> u32
pub fn size(&self) -> Size
pub fn get_depth_slice(&self, depth: u32) -> Option<SurfaceDescriptor>
Sourcepub fn iter_depth_slices(&self) -> impl Iterator<Item = SurfaceDescriptor>
pub fn iter_depth_slices(&self) -> impl Iterator<Item = SurfaceDescriptor>
Iterates over all depth slices of the volume.
To get the depth value of a slice, use .enumerate()
. Example:
let volume: VolumeDescriptor = get_volume();
for (depth, slice) in volume.iter_depth_slices().enumerate() {
println!("Slice {} starts at {}", depth, slice.data_offset());
}
Trait Implementations§
Source§impl Clone for VolumeDescriptor
impl Clone for VolumeDescriptor
Source§fn clone(&self) -> VolumeDescriptor
fn clone(&self) -> VolumeDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl DataRegion for VolumeDescriptor
impl DataRegion for VolumeDescriptor
Source§impl Debug for VolumeDescriptor
impl Debug for VolumeDescriptor
Source§impl Hash for VolumeDescriptor
impl Hash for VolumeDescriptor
Source§impl PartialEq for VolumeDescriptor
impl PartialEq for VolumeDescriptor
impl Copy for VolumeDescriptor
impl Eq for VolumeDescriptor
impl StructuralPartialEq for VolumeDescriptor
Auto Trait Implementations§
impl Freeze for VolumeDescriptor
impl RefUnwindSafe for VolumeDescriptor
impl Send for VolumeDescriptor
impl Sync for VolumeDescriptor
impl Unpin for VolumeDescriptor
impl UnwindSafe for VolumeDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more