IsZero reports whether c is the zero Chunk value. Useful for channel consumers that receive a Chunk after a close-without-value. We intentionally exclude Dir from the predicate: Direction's zero value happens to be FromClient (`iota` starts at 0), so a genuine empty client-side chunk (e.g. a probe
()
| 52 | // be misclassified as zero. A chunk with any of bytes, ReadAt, |
| 53 | // WrittenAt, or SeqNo set is non-zero regardless of Dir. |
| 54 | func (c Chunk) IsZero() bool { |
| 55 | return c.Bytes == nil && c.ReadAt.IsZero() && c.WrittenAt.IsZero() && c.SeqNo == 0 |
| 56 | } |
no outgoing calls