func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
	reader := d.r
	if d.logger != nil {
		debugMsgBuf := bytes.NewBuffer(nil)
		reader = io.TeeReader(reader, debugMsgBuf)
		defer func() {
			logMessageDecode(d.logger, debugMsgBuf, m, err)
		}()
	}

	m, err = Decode(reader, payloadBuf)

	return m, err
}
// Decode attempts to decode a single message from the event stream reader.
// Will return the event stream message, or error if Decode fails to read
// the message from the stream.
Decode attempts to decode a single message from the event stream reader.
Will return the event stream message, or error if Decode fails to read
the message from the stream.
// Decode attempts to decode a single message from the event stream reader . // Will return the event stream message or error if Decode fails to read // the message from the stream .
func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
	reader := d.r
	if d.logger != nil {
		debugMsgBuf := bytes.NewBuffer(nil)
		reader = io.TeeReader(reader, debugMsgBuf)
		defer func() {
			logMessageDecode(d.logger, debugMsgBuf, m, err)
		}()
	}
	m, err = Decode(reader, payloadBuf)
	return m, err
}
func ( d * Decoder ) Decode ( payloadBuf [ ] byte ) ( m Message , err error ) { reader := d . r if d . logger != nil { debugMsgBuf := bytes . NewBuffer ( nil ) reader = io . TeeReader ( reader , debugMsgBuf ) defer func ( ) { logMessageDecode ( d . logger , debugMsgBuf , m , err ) } ( ) } m , err = Decode ( reader , payloadBuf ) return m , err }
Decode attempts to decode a single message from the event stream reader.
Decode attempts to decode a single message from the event stream reader .