pub trait ConvertAsBytes {
// Required method
fn convert_as_bytes(&self) -> Vec<u8> ⓘ;
}Expand description
ConvertAsBytes convert different types of data into a Vec<u8>, made just for convinence
It is auto implemented (if imported) for the following types:
Vec<u8>, &[u8], &str, String, [u8; N] (1 thru 16), and u8
Required Methods§
Sourcefn convert_as_bytes(&self) -> Vec<u8> ⓘ
fn convert_as_bytes(&self) -> Vec<u8> ⓘ
convert_as_bytes converts a previous type to a Vec<u8>