gossamer/text_decoder_stream

Types

A stream-based decoder: writes bytes to the writable side, reads text from the readable side.

See TextDecoderStream on MDN.

pub type TextDecoderStream

Values

pub fn encoding(
  of decoder: TextDecoderStream,
) -> encoding.Encoding
pub fn is_fatal(decoder: TextDecoderStream) -> Bool
pub fn is_ignore_bom(decoder: TextDecoderStream) -> Bool
pub fn new_with(
  label: String,
  with options: List(text_decoder.TextDecoderOption),
) -> Result(TextDecoderStream, js_error.JsError)

Creates a TextDecoderStream with the given encoding label and options. Returns an error if the label isn’t a recognized encoding.

pub fn readable(
  of decoder: TextDecoderStream,
) -> readable_stream.ReadableStream(String)
Search Document