code: func (p *Preference) UnmarshalBinary(b []byte) error {
  	if len(b) != 1 {
  		return io.ErrUnexpectedEOF
  	}
  
  	*p = Preference(b[0])
  	return nil
  }
docs: // UnmarshalBinary unmarshals a raw byte slice into a Preference.
  //
  // If the byte slice is not exactly 1 byte in length, io.ErrUnexpectedEOF is
  // returned.