стандартная библиотекаstandard library

Стандартная библиотека RustThe Rust standard library

Коллекции, строки, обёртки над памятью, конкурентность, ввод-вывод — то, чем реально пишется код каждый день, в отличие от языковых механизмов из language/. Каркас: 24 фичи по 7 тематическим разделам, страницы пока не написаны.Collections, strings, memory wrappers, concurrency, I/O — what code is actually written with every day, as opposed to the language mechanisms in language/. Skeleton: 24 features across 7 topic sections, pages not yet written.

КоллекцииCollections

аналог C++ STL-контейнеровthe analogue of C++ STL containers
01
не начатоnot started

Vec<T>

Растущий массив на куче — аналог std::vector, дефолтная коллекция для почти всего.A growable heap array — the analogue of std::vector, the default collection for almost everything.

02
не начатоnot started

HashMap / HashSet

Хеш-таблица с рандомизированным по умолчанию хешером (защита от HashDoS) — аналог unordered_map/set.A hash table with a randomized-by-default hasher (HashDoS protection) — the analogue of unordered_map/set.

03
не начатоnot started

BTreeMap / BTreeSet

Упорядоченные ассоциативные контейнеры на B-дереве — аналог map/set, лучше кэш-локальность, чем у RB-дерева.Ordered associative containers backed by a B-tree — the analogue of map/set, with better cache locality than an RB-tree.

04
не начатоnot started

VecDeque<T>

Кольцевой буфер с O(1) push/pop с обоих концов — аналог std::deque.A ring buffer with O(1) push/pop from both ends — the analogue of std::deque.

05
не начатоnot started

BinaryHeap<T>

Бинарная куча (max-heap по умолчанию) — аналог std::priority_queue.A binary heap (max-heap by default) — the analogue of std::priority_queue.

06
не начатоnot started

LinkedList<T>

Двусвязный список — присутствует в std, но почти никогда не является правильным выбором по сравнению с Vec/VecDeque.A doubly-linked list — present in std, but almost never the right choice compared to Vec/VecDeque.

Строки и текстStrings and text

UTF-8 по умолчанию, без исключенийUTF-8 by default, no exceptions

Option/Result: библиотечный APIOption/Result: the library API

комбинаторы, не концепцияcombinators, not the concept

Концепция и оператор ? уже разобраны в language/error-handling.html — здесь только полный набор методов на самих типах.The concept and the ? operator are already covered in language/error-handling.html — this section is only the full set of methods on the types themselves.

Память как APIMemory as an API

методы, а не концепция владенияmethods, not the ownership concept

Сами механизмы (ownership, Rc/Arc/RefCell) разобраны в language/smart-pointers.html — здесь конкретные методы этих типов и утилиты std::mem.The mechanisms themselves (ownership, Rc/Arc/RefCell) are covered in language/smart-pointers.html — this section covers the concrete methods on those types and the std::mem utilities.

Конкурентность stdstd concurrency

потоки, мьютексы, каналыthreads, mutexes, channels

Ввод-выводI/O

трейты Read/Write, файловая системаthe Read/Write traits, the filesystem

Разное системноеMiscellaneous systems bits

время, окружение, конвертацииtime, environment, conversions

статусstatus

Это каркас: разделы и список фич зафиксированы, страницы фич ещё не написаны. Заполнение будет вестись так же, как language/ — один эталонный файл вручную на раздел, затем параллельные агенты на остальные, затем независимая проверка.This is a skeleton: the sections and feature list are locked in, but the feature pages themselves haven't been written yet. Filling it in will follow the same process as language/ — one hand-written reference file per section, then parallel agents for the rest, then an independent check.