IntoVec

Trait IntoVec 

Source
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§

Source

fn into_vec(self) -> Vec<u8>

Convert to a Vec<u8>.

Implementations on Foreign Types§

Source§

impl IntoVec for Vec<u8>

Source§

fn into_vec(self) -> Vec<u8>

Source§

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

Source§

fn into_vec(self) -> Vec<u8>

Source§

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

Source§

fn into_vec(self) -> Vec<u8>

Implementors§