Function |to_bytes

std/conv::|to_bytes


Usage

|to_bytes<T>(value)

Generics

◻ T (any)

Parameters

↳ value: T

Return

↴ Vec<byte>


Turns data into Vec<byte>.

Data element gets converted into Vec<byte>, with vector containing the binary form of data it represents.

ℹ️ While this conversion is infaillible, resulting vector may be empty. Content format and length of vector is totally dependent on data type given, and might not be constant (like for char or string types).