MemDeExt

Trait MemDeExt 

Source
pub trait MemDeExt: Sized {
    const PREFER_FROM_BYTE_BUF: bool;

    // Required methods
    fn try_from_byte_buf<E: Error>(buf: Vec<u8>) -> Result<Self, E>;
    fn try_from_bytes<E: Error>(slice: &[u8]) -> Result<Self, E>;
}

Required Associated Constants§

Required Methods§

Source

fn try_from_byte_buf<E: Error>(buf: Vec<u8>) -> Result<Self, E>

Source

fn try_from_bytes<E: Error>(slice: &[u8]) -> Result<Self, E>

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.

Implementations on Foreign Types§

Source§

impl MemDeExt for Rc<[u8]>

Source§

const PREFER_FROM_BYTE_BUF: bool = false

Source§

fn try_from_byte_buf<E: Error>(buf: Vec<u8>) -> Result<Self, E>

Source§

fn try_from_bytes<E: Error>(slice: &[u8]) -> Result<Self, E>

Source§

impl<const LEN: usize> MemDeExt for Box<[u8; LEN]>

Source§

const PREFER_FROM_BYTE_BUF: bool = true

Source§

fn try_from_byte_buf<E: Error>(buf: Vec<u8>) -> Result<Self, E>

Source§

fn try_from_bytes<E: Error>(slice: &[u8]) -> Result<Self, E>

Source§

impl<const LEN: usize> MemDeExt for [u8; LEN]

Source§

const PREFER_FROM_BYTE_BUF: bool = false

Source§

fn try_from_byte_buf<E: Error>(buf: Vec<u8>) -> Result<Self, E>

Source§

fn try_from_bytes<E: Error>(slice: &[u8]) -> Result<Self, E>

Implementors§