multipartkit/error

Types

Errors that can be produced by parsing, encoding, or querying a multipart message.

Variants that carry a payload preserve the offending raw text so callers can surface diagnostics without re-running the parser.

pub type MultipartError {
  MissingBoundary
  InvalidContentType(String)
  InvalidBoundary(String)
  InvalidHeader(String)
  InvalidContentDisposition(String)
  UnexpectedEndOfInput
  BodyTooLarge(limit: Int)
  PartTooLarge(limit: Int)
  TooManyParts(limit: Int)
  HeaderTooLarge(limit: Int)
  InvalidUtf8Field(name: String)
  MissingField(name: String)
  MissingFile(name: String)
  UnsupportedMediaType(String)
  UnsupportedFeature(String)
  DisallowedContentType(String)
}

Constructors

  • MissingBoundary

    The Content-Type header had no boundary parameter.

  • InvalidContentType(String)

    The Content-Type header value could not be parsed as a media type.

  • InvalidBoundary(String)

    The boundary value violates the RFC 2046 grammar.

  • InvalidHeader(String)

    A header line could not be parsed (missing : separator or otherwise malformed).

  • InvalidContentDisposition(String)

    A Content-Disposition value could not be parsed.

  • UnexpectedEndOfInput

    Input ended before a complete message could be parsed.

  • BodyTooLarge(limit: Int)

    The total bytes consumed from input exceeded max_body_bytes.

  • PartTooLarge(limit: Int)

    A single part body exceeded max_part_bytes.

  • TooManyParts(limit: Int)

    The number of parts produced exceeded max_parts.

  • HeaderTooLarge(limit: Int)

    A single part header block exceeded max_header_bytes.

  • InvalidUtf8Field(name: String)

    A query helper tried to decode a field body as UTF-8 and failed.

  • MissingField(name: String)

    A required field (text part) was not present.

  • MissingFile(name: String)

    A required file part was not present.

  • UnsupportedMediaType(String)

    The Content-Type media type is not multipart/*.

  • UnsupportedFeature(String)

    A syntactically valid feature is intentionally unsupported by this release.

  • DisallowedContentType(String)

    Validation rejected a part because its Content-Type is outside an application-supplied allow-list.

Search Document