in

Types

Represents supported text encodings for input operations.

pub type Encoding {
  Latin1
  Unicode
  Utf8
  Utf16
  Utf32
}

Constructors

  • Latin1
  • Unicode
  • Utf8
  • Utf16
  • Utf32

Represents all possible errors that can occur during input operations.

pub type Error {
  Eof
  Badarg
  Terminated
  NoTranslation(Encoding, Encoding)
  Eacces
  Eagain
  Ebadf
  Ebadmsg
  Ebusy
  Edeadlk
  Edeadlock
  Edquot
  Eexist
  Efault
  Efbig
  Eftype
  Eintr
  Einval
  Eio
  Eisdir
  Eloop
  Emfile
  Emlink
  Emultihop
  Enametoolong
  Enfile
  Enobufs
  Enodev
  Enolck
  Enolink
  Enoent
  Enomem
  Enospc
  Enosr
  Enostr
  Enosys
  Enotblk
  Enotdir
  Enotsup
  Enxio
  Eopnotsupp
  Eoverflow
  Eperm
  Epipe
  Erange
  Erofs
  Espipe
  Esrch
  Estale
  Etxtbsy
  Exdev
}

Constructors

  • Eof
  • Badarg
  • Terminated
  • NoTranslation(Encoding, Encoding)
  • Eacces
  • Eagain
  • Ebadf
  • Ebadmsg
  • Ebusy
  • Edeadlk
  • Edeadlock
  • Edquot
  • Eexist
  • Efault
  • Efbig
  • Eftype
  • Eintr
  • Einval
  • Eio
  • Eisdir
  • Eloop
  • Emfile
  • Emlink
  • Emultihop
  • Enametoolong
  • Enfile
  • Enobufs
  • Enodev
  • Enolck
  • Enolink
  • Enoent
  • Enomem
  • Enospc
  • Enosr
  • Enostr
  • Enosys
  • Enotblk
  • Enotdir
  • Enotsup
  • Enxio
  • Eopnotsupp
  • Eoverflow
  • Eperm
  • Epipe
  • Erange
  • Erofs
  • Espipe
  • Esrch
  • Estale
  • Etxtbsy
  • Exdev

Values

pub fn read_chars(number: Int) -> Result(String, Error)

Reads up to number characters from the standard input.

If the requested number of characters exceeds the available input, returns everything until the end of input.

pub fn read_line() -> Result(String, Error)

Reads a line from the standard input.

Search Document