pub struct PlaneLayout {
pub offset: usize,
pub len: usize,
pub stride: usize,
}Expand description
Plane layout information stored with a frame.
§Example
use std::num::NonZeroU32;
use styx_core::prelude::plane_layout_from_dims;
let layout = plane_layout_from_dims(
NonZeroU32::new(4).unwrap(),
NonZeroU32::new(4).unwrap(),
3,
);
assert_eq!(layout.stride, 12);Fields§
§offset: usizeByte offset into the owning buffer.
len: usizeLength of the plane in bytes.
stride: usizeStride in bytes.
Trait Implementations§
Source§impl Clone for PlaneLayout
impl Clone for PlaneLayout
Source§fn clone(&self) -> PlaneLayout
fn clone(&self) -> PlaneLayout
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 PlaneLayout
impl Debug for PlaneLayout
impl Copy for PlaneLayout
Auto Trait Implementations§
impl Freeze for PlaneLayout
impl RefUnwindSafe for PlaneLayout
impl Send for PlaneLayout
impl Sync for PlaneLayout
impl Unpin for PlaneLayout
impl UnwindSafe for PlaneLayout
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