API reference Dodo 0.1.4

std/process/alloc

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

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/process/alloc"

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
arena alloc/arena alloc.dodo
bytes_alloc std/bytes_alloc alloc.dodo
error alloc/error alloc.dodo
process std/process alloc.dodo

Error

Enum · Source

pub enum Error {
    Allocation(error.AllocError),
    Collection(process.CollectError)
}

Output

Struct · Source

pub struct Output<A, B> {
    // Private implementation fields omitted.
}

Output.stdout

Function · Source

pub fn stdout(&self) -> &[u8]

Output.stderr

Function · Source

pub fn stderr(&self) -> &[u8]

Output.status

Function · Source

pub fn status(&self) -> &process.ExitStatus

collect

Function · Source

SAFETY: Both allocators meet std/bytes_alloc.new’s allocation/deallocation contract. Each is exclusively borrowed by its output buffer. No global allocator is consulted. Both bounds are allocated before touching the child. Allocation failure leaves the child live; collection failure reaps it and destroys both buffers (use caller-backed collect to retain failure prefixes).

pub unsafe fn collect<A, B>(child: &mut process.Child, stdout_allocator: &mut A,
stderr_allocator: &mut B, stdout_limit: usize, stderr_limit: usize,
timeout_ms: u64) -> Output<A, B>!Error from(stdout_allocator, stderr_allocator)

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

collect_arena

Function · Source

pub fn collect_arena(child: &mut process.Child, stdout_allocator: &mut arena.Arena,
stderr_allocator: &mut arena.Arena, stdout_limit: usize, stderr_limit: usize,
timeout_ms: u64) -> Output<arena.Arena, arena.Arena>!Error from(stdout_allocator, stderr_allocator)

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
?