Skip to main content

ByteStorage

Trait ByteStorage 

Source
pub trait ByteStorage {
    // Required method
    fn as_bytes(&self) -> &[u8] ⓘ;
}
Expand description

Full re-export of zenpixels core types (zero module name collisions!). Read access to native-endian pixel bytes without copying.

Required Methods§

Source

fn as_bytes(&self) -> &[u8] ⓘ

Underlying bytes in native endianness.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> ByteStorage for &[T]
where T: Pod,

Source§

fn as_bytes(&self) -> &[u8] ⓘ

Source§

impl<T> ByteStorage for &mut [T]
where T: Pod,

Source§

fn as_bytes(&self) -> &[u8] ⓘ

Source§

impl<T> ByteStorage for Arc<Vec<T>>
where T: Pod,

Source§

fn as_bytes(&self) -> &[u8] ⓘ

Source§

impl<T> ByteStorage for Arc<[T]>
where T: Pod,

Source§

fn as_bytes(&self) -> &[u8] ⓘ

Source§

impl<T> ByteStorage for Box<[T]>
where T: Pod,

Source§

fn as_bytes(&self) -> &[u8] ⓘ

Source§

impl<T> ByteStorage for Vec<T>
where T: Pod,

Source§

fn as_bytes(&self) -> &[u8] ⓘ

Implementors§