IntoVec

Trait IntoVec 

pub trait IntoVec: AsRef<[u8]> {
    // Required method
    fn into_vec(self) -> Vec<u8> ;
}
Expand description

Trait for converting encoded types to Vec<u8>.

This is implemented for all AsRef<[u8]> types. For Vec<u8> this is a no-op, for other types like ArrayVec or fixed arrays it performs a copy.

Required Methods§

fn into_vec(self) -> Vec<u8>

Convert to a Vec<u8>.

Implementations on Foreign Types§

§

impl IntoVec for Vec<u8>

§

fn into_vec(self) -> Vec<u8>

§

impl<const N: usize> IntoVec for ArrayVec<u8, N>

§

fn into_vec(self) -> Vec<u8>

§

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

§

fn into_vec(self) -> Vec<u8>

Implementors§