var ErrASCIIReplacement = RepertoireError(encoding.ASCIISub)
Encoding is an implementation of the Encoding interface that adds the String and ID methods to an existing encoding.
type Encoding struct {
encoding.Encoding
Name string
MIB identifier.MIB
}
func (e *Encoding) ID() (mib identifier.MIB, other string)
func (e *Encoding) String() string
FuncEncoding is an Encoding that combines two functions returning a new Transformer.
type FuncEncoding struct {
Decoder func() transform.Transformer
Encoder func() transform.Transformer
}
func (e FuncEncoding) NewDecoder() *encoding.Decoder
func (e FuncEncoding) NewEncoder() *encoding.Encoder
A RepertoireError indicates a rune is not in the repertoire of a destination encoding. It is associated with an encoding-specific suggested replacement byte.
type RepertoireError byte
func (r RepertoireError) Error() string
Error implements the error interface.
func (r RepertoireError) Replacement() byte
Replacement returns the replacement string associated with this error.
SimpleEncoding is an Encoding that combines two Transformers.
type SimpleEncoding struct {
Decoder transform.Transformer
Encoder transform.Transformer
}
func (e *SimpleEncoding) NewDecoder() *encoding.Decoder
func (e *SimpleEncoding) NewEncoder() *encoding.Encoder
| Name | Synopsis |
|---|---|
| .. | |