Sink

public struct Sink { /* private fields */ }

Writable that swallows everything — analogous to /dev/null. Useful for tests, benchmarks, and code paths where output is suppressed.

Representation

Zero-sized — no fields.

Initializers

public init()

Builds the discarding sink.

ImplementsWritable

Methods

public mutating func flush() -> Result[(), IoError]

No-op; always succeeds.

public mutating func write(from: ArraySlice[UInt8]) -> Result[Int64, IoError]

Returns .Ok(buf.count) without storing the bytes.

Defined in lang/std/io/write.ks