#[non_exhaustive]pub struct Layout {
pub size: Size,
pub modifier: Modifier,
pub plane_count: u32,
pub offsets: [Size; 4],
pub strides: [Size; 4],
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.size: Size§modifier: Modifier§plane_count: u32§offsets: [Size; 4]§strides: [Size; 4]Implementations§
source§impl Layout
impl Layout
pub fn new() -> Self
pub fn size(self, size: Size) -> Self
pub fn modifier(self, modifier: Modifier) -> Self
pub fn plane_count(self, plane_count: u32) -> Self
pub fn offsets(self, offsets: [Size; 4]) -> Self
pub fn strides(self, strides: [Size; 4]) -> Self
pub fn offset(self, plane: usize, offset: Size) -> Self
pub fn stride(self, plane: usize, stride: Size) -> Self
pub fn packed( class: &Class, extent: Extent, con: Option<Constraint>, ) -> Result<Self, Error>
pub fn fit(&self, con: Option<Constraint>) -> bool
Trait Implementations§
impl Copy for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)