API reference Dodo 0.1.4

std/console

Public declarations, types, methods, and source contracts for std/console.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/console"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
fmt std/fmt console.dodo
io std/io console.dodo
native std/platform/native console.dodo

Input

Struct · Source

Unbuffered borrowed process streams. No allocation, implicit flush, ownership transfer, or close-on-drop. Calls may block; separate wrappers may interleave. Bytes are passed through unchanged, including LF on both hosted targets.

pub struct Input {
    // Private implementation fields omitted.
}

Input.read

Function · Source

pub fn read(&mut self, destination: &mut[u8]) -> usize!io.Error

Input.read_line

Function · Source

pub fn read_line(&mut self, destination: &mut[u8]) -> io.Line!io.Error

Output

Struct · Source

pub struct Output {
    // Private implementation fields omitted.
}

Output.write

Function · Source

pub fn write(&mut self, source: &[u8]) -> usize!io.Error

Output.print

Function · Source

Compiler-expanded calls retain ordinary typed parameters and borrowing.

@compiler(print)
pub fn print<T>(&mut self, value: T) -> usize!io.Error

Output.println

Function · Source

@compiler(println)
pub fn println<T>(&mut self, value: T) -> usize!io.Error

Output.printf

Function · Source

@compiler(printf)
pub fn printf(&mut self, format: &str) -> usize!io.Error

stdin

Function · Source

pub fn stdin() -> Input

stdout

Function · Source

pub fn stdout() -> Output

stderr

Function · Source

pub fn stderr() -> Output

print

Function · Source

printf accepts a literal followed by heterogeneous arguments. See std/fmt.

@compiler(print)
pub fn print<T>(value: T) -> usize!io.Error

println

Function · Source

@compiler(println)
pub fn println<T>(value: T) -> usize!io.Error

printf

Function · Source

@compiler(printf)
pub fn printf(format: &str) -> usize!io.Error

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?