moonbitlang/core/async/stdio does not have a README file

    Input

    pub struct Input {
    text :
    Utf8Reader

    // private fields
    }

    Input channel type for stdin

    Input::drop_all

    async fn Input::drop_all(self : Input) -> Int64

    Input::drop_exactly

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

    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::peek

    async fn Input::peek(self : Input) -> BytesView?

    Input::peek_at_least

    async fn Input::peek_at_least(self : Input, min_len : Int) -> BytesView

    Input::peek_exactly

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

    Input::peek_until

    async fn Input::peek_until(self : Input, pattern : BytesView, include_delimiter? : Bool) -> BytesView?

    Input::read

    async fn Input::read(self : Input) -> Bytes?

    Input::read_all

    async fn Input::read_all(self : Input) -> Bytes

    Input::read_at_least

    async fn Input::read_at_least(self : Input, min_len : Int) -> Bytes

    Input::read_exactly

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

    Input::read_into

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

    Input::read_until

    async fn Input::read_until(self : Input, pattern : BytesView, include_delimiter? : Bool) -> Bytes?

    Output

    pub struct Output {
    text :
    Utf8Writer

    // private fields
    }

    Output channel type for stdout/stderr

    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 : BytesView) -> Unit

    Output::write_reader

    async fn Output::write_reader(self : Output, reader : &
    BinaryReader
    ) -> 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

    Source Files