Skip to main content

Storage

Trait Storage 

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

This trait must be implemented for types from which you wish to use read_* operations with

Required Methods§

Source

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

Get the bytes that represent this type

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Storage for &[u8]

Source§

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

Source§

impl Storage for &mut [u8]

Source§

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

Source§

impl<const N: usize> Storage for &mut [u8; N]

Source§

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

Source§

impl<const N: usize> Storage for [u8; N]

Source§

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

Implementors§