Sign in

    moonbitlang/async/stdio does not have a README file

    Input

    type Input

    impl Reader for Input

    Input::drop

    async fn Input::drop(self : Input, len : Int) -> Int

    Input::fd

    fn Input::fd(self : Input) -> Int raise

    Return the file descriptor of an input channel.

    If the initialization of the input channel failed, for example when stdin does not exist (Windows) or is not a valid fd (Unix-like), This method will fail with error. So .fd() can be used as a way to tell if stdin is valid.

    Input::read

    async fn Input::read(self : Input, dst : FixedArray[Byte], offset? : Int, max_len? : Int) -> Int

    Input::read_all

    async fn Input::read_all(self : Input) -> &
    Data

    Input::read_exactly

    async fn Input::read_exactly(self : Input, len : Int) -> Bytes

    Input::read_some

    async fn Input::read_some(self : Input, max_len? : Int) -> Bytes?

    Input::read_until

    async fn Input::read_until(self : Input, sep : StringView) -> String?

    Output

    type Output

    impl Writer for Output

    Output::fd

    fn Output::fd(self : Output) -> Int raise

    Return the file descriptor of an output channel.

    If the initialization of the output channel failed, for example when stdout does not exist (Windows) or is not a valid fd (Unix-like), This method will fail with error. So .fd() can be used as a way to tell if stdout/stderr is valid.

    Output::write

    async fn Output::write(self : Output, data : &
    Data
    ) -> Unit

    Output::write_once

    async fn Output::write_once(self : Output, buf : Bytes, offset~ : Int, len~ : Int) -> Int

    Output::write_reader

    async fn Output::write_reader(self : Output, reader : &
    Reader
    ) -> Unit

    stderr

    let stderr : Output

    The standard error channel.

    If stderr does not exist or is invalid, all operations on stderr will immediately fail with error.

    Windows note: console handles are text based on Windows. If stderr is a Windows console output, binary IO over stderr will be interpreted as UTF-8 sequence, and submitted to the actual console screen buffer via unicode-safe API. If the input is not valid UTF-8, the correct parts will be preserved, but the final output for incorrect parts is undefined

    stdin

    let stdin : Input

    The standard input channel.

    If stdin does not exist or is invalid, all operations on stdin will immediately fail with error.

    Windows note: console handles are text based on Windows. If stdin is a Windows console input, unicode text read from the console will be decoded to UTF-8.

    stdout

    let stdout : Output

    The standard output channel.

    If stdout does not exist or is invalid, all operations on stdout will immediately fail with error.

    Windows note: console handles are text based on Windows. If stdout is a Windows console output, binary IO over stdout will be interpreted as UTF-8 sequence, and submitted to the actual console screen buffer via unicode-safe API. If the input is not valid UTF-8, the correct parts will be preserved, but the final output for incorrect parts is undefined

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io