Trait Array

Source
pub trait Array<const N: usize>: Abi {
    // Required method
    fn from_ptr<A: Abi>(ptr: *const A) -> Result<Self>;
}
Expand description

A fixed, statically sized chunk of data that can be read from the Source.

Required Methods§

Source

fn from_ptr<A: Abi>(ptr: *const A) -> Result<Self>

Decodes a chunk of bytes into an ABI-compatible type.

§Errors

Returns an error if ptr is null or otherwise invalid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Abi + Integer + Zeroable, const N: usize> Array<N> for T

Source§

impl<const N: usize> Array<N> for Chunk<N>