internal/encoder/encoding

Public types for the available encoders. Available encodings.

Types

Errors which can be returned from the encoder functions

pub type EncoderError {
  InvalidCharacter(String)
  InvalidEmailAddress(String)
  InvalidDomain(String)
  MaximumSizeExceeded(Int)
  NoEncoderFound
  UnknownError
}

Constructors

  • InvalidCharacter(String)
  • InvalidEmailAddress(String)
  • InvalidDomain(String)
  • MaximumSizeExceeded(Int)
  • NoEncoderFound
  • UnknownError

Available encodings

pub type Encoding {
  Bit(Int)
  Base64
  PercentEncoding
  QuotedPrintable(Rfc)
  Text(FieldType)
}

Constructors

  • Bit(Int)
  • Base64
  • PercentEncoding
  • QuotedPrintable(Rfc)
  • Text(FieldType)

Mode to use when encoding

pub type EncodingMode {
  Ascii
  Utf8
}

Constructors

  • Ascii
  • Utf8

Field types as defined in RFC 822.

  • Unstructured: Fields that contain text not further structured (e.g., Subject, Comments).
  • Structured: Fields that have a formally defined structure (e.g., From, To, Date, Message-ID).
pub type FieldType {
  Unstructured
  Structured
}

Constructors

  • Unstructured
  • Structured

The possible RFC’s to follow when encoding a string using QuotedPrintable.

pub type Rfc {
  Rfc2045
  Rfc2047
}

Constructors

  • Rfc2045
  • Rfc2047
Search Document