code: func (e *Entry) GetStreamIndex() (types.MessageIndex, error) {
  	if e.streamIndex < 0 {
  		le, err := e.GetLogEntry()
  		if err != nil {
  			return -1, err
  		}
  
  		e.streamIndex = types.MessageIndex(le.StreamIndex)
  	}
  
  	return e.streamIndex, nil
  }
docs: // GetStreamIndex returns the LogEntry's stream index.
  //
  // If this needs to be calculated by unmarshalling the LogEntry, this will be
  // done. If this fails, an error will be returned.
  //
  // If GetLogEntry has succeeded, subsequent GetStreamIndex calls will always
  // be fast and succeed.