class

TermBuf::CursorIO

Inherits IO::Buffered < IO < Reference < Object

Stability: stable — changes only in a major release.

An IO bound to a Cursor.

Unbuffered by default, so what is written has reached the buffer by the time the call returns and the next paint shows it. An application streaming enough text for the command traffic to matter can set sync = false, which gathers writes until a newline or a #flush.

Constructors

new(cursor : Cursor)
Source

Instance methods

cursor

Where this writes.

Source
unbuffered_close

Closes the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_flush

Flushes the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_read(slice : Bytes) : Int32

Always raises. A cursor is somewhere to put text, not somewhere to get it.

Source
unbuffered_rewind

Always raises, for the same reason as #unbuffered_read.

Source
unbuffered_write(slice : Bytes) : Nil

Writes slice entirely into the wrapped IO.

TODO: Add return type restriction Nil

Source