code: func (s *State) MarshalEqual(other *State) bool {
  	if s == nil && other == nil {
  		return true
  	} else if s == nil || other == nil {
  		return false
  	}
  
  	recvBuf := &bytes.Buffer{}
  	otherBuf := &bytes.Buffer{}
  
  	err := WriteState(s, recvBuf)
  	if err != nil {
  		// should never happen, since we're writing to a buffer
  		panic(err)
  	}
  
  	err = WriteState(other, otherBuf)
  	if err != nil {
  		// should never happen, since we're writing to a buffer
  		panic(err)
  	}
  
  	return bytes.Equal(recvBuf.Bytes(), otherBuf.Bytes())
  }
docs: // MarshalEqual is similar to Equal but provides a stronger definition of
  // "equal", where two states are equal if and only if their serialized form
  // is byte-for-byte identical.
  //
  // This is primarily useful for callers that are trying to save snapshots
  // of state to persistent storage, allowing them to detect when a new
  // snapshot must be taken.
  //
  // Note that the serial number and lineage are included in the serialized form,
  // so it's the caller's responsibility to properly manage these attributes
  // so that this method is only called on two states that have the same
  // serial and lineage, unless detecting such differences is desired.