Repeat

public struct Repeat { /* private fields */ }

Readable that yields the same byte forever — analogous to /dev/zero (with byte: 0) or yes(1). Each read fills the entire destination.

Representation

One UInt8 field for the repeated byte.

Properties

var byte: UInt8

Initializers

public init(byte: UInt8)

Builds a reader that yields byte indefinitely.

ImplementsReadable

Methods

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

Fills buf with the repeated byte; returns .Ok(buf.count).

Defined in lang/std/io/read.ks