gossamer/text_decoder
Types
Represents a decoder for a specific text encoding, allowing you to convert binary data into a string given the encoding.
pub type TextDecoder
Values
pub fn decode(input: array_buffer.ArrayBuffer) -> String
Turns binary data, often in the form of a Uint8Array, into a string given the encoding.
pub fn decode_chunk(
decoder: TextDecoder,
input: array_buffer.ArrayBuffer,
) -> String
pub fn decode_with(
input: array_buffer.ArrayBuffer,
label: String,
options: List(text_decoder_option.TextDecoderOption),
) -> String
pub fn fatal(decoder: TextDecoder) -> Bool
Returns true if error mode is “fatal”, otherwise false.
pub fn flush(decoder: TextDecoder) -> String
pub fn new() -> TextDecoder
pub fn new_with(
label: String,
options: List(text_decoder_option.TextDecoderOption),
) -> TextDecoder