pub trait ContiguousMemory {
// Required methods
fn as_ptr(&self) -> *const u8;
fn layout(&self) -> &MemoryLayout;
// Provided methods
fn is_contiguous(&self) -> bool { ... }
fn size_bytes(&self) -> usize { ... }
}Expand description
Trait for types that have contiguous memory representation
Required Methods§
Sourcefn layout(&self) -> &MemoryLayout
fn layout(&self) -> &MemoryLayout
Get the memory layout
Provided Methods§
Sourcefn is_contiguous(&self) -> bool
fn is_contiguous(&self) -> bool
Check if the memory is contiguous
Sourcefn size_bytes(&self) -> usize
fn size_bytes(&self) -> usize
Get the size in bytes