Trait vmap::Span[][src]

pub trait Span: Deref<Target = [u8]> + Sized + Span {
    fn len(&self) -> usize;
fn as_ptr(&self) -> *const u8; fn is_empty(&self) -> bool { ... }
fn read_volatile<T: Scalar>(&self, offset: usize) -> T { ... }
fn read_unaligned<T: Scalar>(&self, offset: usize) -> T { ... } }
Expand description

General trait for working with any memory-safe representation of a contiguous region of arbitrary memory.

Required methods

Get the length of the allocated region.

Get the pointer to the start of the allocated region.

Provided methods

Tests if the span covers zero bytes.

Performs a volatile read of the value at a given offset.

Volatile operations are intended to act on I/O memory, and are guaranteed to not be elided or reordered by the compiler across other volatile operations.

Performs an unaligned read of the value at a given offset.

Implementations on Foreign Types

Implementors