EncodeAscii encodes the value using 7-bit clean ascii bytes.
(b encoding2.BinaryWriter)
| 104 | |
| 105 | // EncodeAscii encodes the value using 7-bit clean ascii bytes. |
| 106 | func (v Value) EncodeAscii(b encoding2.BinaryWriter) { |
| 107 | if v.Inner == nil { |
| 108 | if _, err := b.Write(nullstr); err != nil { |
| 109 | panic(err) |
| 110 | } |
| 111 | } else { |
| 112 | v.Inner.encodeAscii(b) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // MarshalBinary helps implement BinaryMarshaler interface for Value. |
| 117 | func (v Value) MarshalBinary() ([]byte, error) { |