[][src]Function typescript_definitions_ufo_patch::as_byte_string

pub fn as_byte_string<S>(bytes: &[u8], serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer

String serializer for u8 byte buffers.

Use #[serde(serialize_with="typescript_definitions::as_byte_string")] on a [u8] or Vec<u8> object to make the output type a string (instead of a number[]). The encoding is a simple \xdd format.

Or provide your own serializer: typescript-definitions only checks the final name "as_byte_string" of the path.