SetSendable sets the body of the message to a Sendable
(x Sendable)
| 179 | |
| 180 | // SetSendable sets the body of the message to a Sendable |
| 181 | func (m *Message) SetSendable(x Sendable) { |
| 182 | m.buf = x.Marshal(m.buf[:HeaderLen]) |
| 183 | h := m.Header() |
| 184 | h.SetBodyLen(len(m.buf) - HeaderLen) |
| 185 | m.setHeader(h) |
| 186 | } |
| 187 | |
| 188 | func (m *Message) Body() []byte { |
| 189 | return m.buf[HeaderLen:] |
nothing calls this directly
no test coverage detected