//
// Implementations of Read are discouraged from returning a
// zero byte count with a nil error, and callers should treat
-// that situation as a no-op.
+// that situation as a no-op. Implementations must not retain p.
type Reader interface {
Read(p []byte) (n int, err error)
}
// and any error encountered that caused the write to stop early.
// Write must return a non-nil error if it returns n < len(p).
// Write must not modify the slice data, even temporarily.
+//
+// Implementations must not retain p.
type Writer interface {
Write(p []byte) (n int, err error)
}
//
// Clients of ReadAt can execute parallel ReadAt calls on the
// same input source.
+//
+// Implementations must not retain p.
type ReaderAt interface {
ReadAt(p []byte, off int64) (n int, err error)
}
//
// Clients of WriteAt can execute parallel WriteAt calls on the same
// destination if the ranges do not overlap.
+//
+// Implementations must not retain p.
type WriterAt interface {
WriteAt(p []byte, off int64) (n int, err error)
}