// Generated by Lisette bindgen
// Source: testing/iotest (Go stdlib)
// Go: 1.25.5
// Lisette: 0.1.14

import "go:io"

/// DataErrReader changes the way errors are handled by a Reader. Normally, a
/// Reader returns an error (typically EOF) from the first Read call after the
/// last piece of data is read. DataErrReader wraps a Reader and changes its
/// behavior so the final error is returned along with the final data, instead
/// of in the first call after the final data.
pub fn DataErrReader(r: io.Reader) -> io.Reader

/// ErrReader returns an [io.Reader] that returns 0, err from all Read calls.
pub fn ErrReader(err: error) -> io.Reader

/// HalfReader returns a Reader that implements Read
/// by reading half as many requested bytes from r.
pub fn HalfReader(r: io.Reader) -> io.Reader

/// NewReadLogger returns a reader that behaves like r except
/// that it logs (using [log.Printf]) each read to standard error,
/// printing the prefix and the hexadecimal data read.
pub fn NewReadLogger(prefix: string, r: io.Reader) -> io.Reader

/// NewWriteLogger returns a writer that behaves like w except
/// that it logs (using [log.Printf]) each write to standard error,
/// printing the prefix and the hexadecimal data written.
pub fn NewWriteLogger(prefix: string, w: io.Writer) -> io.Writer

/// OneByteReader returns a Reader that implements
/// each non-empty Read by reading one byte from r.
pub fn OneByteReader(r: io.Reader) -> io.Reader

/// TestReader tests that reading from r returns the expected file content.
/// It does reads of different sizes, until EOF.
/// If r implements [io.ReaderAt] or [io.Seeker], TestReader also checks
/// that those operations behave as they should.
/// 
/// If TestReader finds any misbehaviors, it returns an error reporting them.
/// The error text may span multiple lines.
pub fn TestReader(r: io.Reader, content: Slice<uint8>) -> Result<(), error>

/// TimeoutReader returns [ErrTimeout] on the second read
/// with no data. Subsequent calls to read succeed.
pub fn TimeoutReader(r: io.Reader) -> io.Reader

/// TruncateWriter returns a Writer that writes to w
/// but stops silently after n bytes.
pub fn TruncateWriter(w: io.Writer, n: int64) -> io.Writer

/// ErrTimeout is a fake timeout error.
pub var ErrTimeout: error
