API reference Dodo 0.1.4

alloc/shared_box

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

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

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
block alloc/block shared_box.dodo
error alloc/error shared_box.dodo
layout alloc/layout shared_box.dodo
mem core/mem shared_box.dodo
ptr core/ptr shared_box.dodo
shared_arena alloc/shared_arena shared_box.dodo

Box

Struct · Source

Multiple boxes/containers may each own a handle to one arena. Checked loans retain the arena and backing memory. T cannot contain borrows or Results.

pub struct Box<T> {
    // Private implementation fields omitted.
}

Box.get

Function · Source

pub fn get(&self) -> &T

Box.get_mut

Function · Source

pub fn get_mut(&mut self) -> &mut T

Box.replace

Function · Source

pub fn replace(&mut self, value: T) -> T

Box.into_inner

Function · Source

pub fn into_inner(self) -> T

new

Function · Source

Failure destroys the value once. Allocator metadata is never exposed through any checked value reference and there is no callback inside allocate.

pub fn new<T>(allocator: shared_arena.Handle, value: T) -> Box<T>!error.AllocError from(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
?