Skip to main content

EncodableLayout

Trait EncodableLayout 

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

Types which are safe to treat as an immutable byte slice in a pixel layout for image encoding.

Required Methods§

Source

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

Get the bytes of this value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl EncodableLayout for [f32]

Source§

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

Source§

impl EncodableLayout for [u8]

Source§

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

Source§

impl EncodableLayout for [u16]

Source§

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

Implementors§