Search results

There are no results.

std.io.Seek

trait pub Seek[E]

Trait for seeking to a given offset in a stream of bytes.

Required methods

seek

Show source code
Hide source code
fn pub mut seek(position: SeekFrom) -> Result[Int, E]
fn pub mut seek(position: SeekFrom) -> Result[Int, E]

Seeks to the given offset, returning the new offset.

Upon success the new offset (in bytes) is returned.

Seeking beyond the end of the stream is allowed, but seeking before the start of the stream is an error.

Implementations

std.fs.file.

ReadOnlyFile

impl Seek[Error] for ReadOnlyFile
std.fs.file.

ReadWriteFile

impl Seek[Error] for ReadWriteFile
std.fs.file.

WriteOnlyFile

impl Seek[Error] for WriteOnlyFile
std.io.

Buffer

impl Seek[Error] for Buffer