gossamer/encoding

Parent module for the text-encoding family — TextDecoder, TextDecoderStream, and TextEncoderStream. Hosts the shared DecoderError returned from decoder-side operations.

Types

Errors raised by TextDecoder and TextDecoderStream operations.

pub type DecoderError {
  UnsupportedEncoding(label: String)
  MalformedInput
}

Constructors

  • UnsupportedEncoding(label: String)

    The encoding label is not a recognized encoding name. The label payload carries the offending input.

  • MalformedInput

    The decoder is in fatal mode and encountered bytes that don’t form a valid sequence for the configured encoding. Produced by decode_chunk, flush, and decode.

Search Document