Skip to content
🦀

Rust Glossary

Bảng Thuật Ngữ Rust

Key Rust terms and concepts with Vietnamese translations. Search or browse alphabetically.

A

Atomically Reference Counted smart pointer for safe shared ownership across threads

Con trỏ thông minh đếm tham chiếu nguyên tử để chia sẻ quyền sở hữu an toàn giữa các luồng

async/await

See: Async/Await

Keywords for writing asynchronous code that looks synchronous, built on the Future trait

Từ khóa để viết mã bất đồng bộ trông giống đồng bộ, xây dựng trên trait Future

B

The Rust compiler component that enforces ownership and borrowing rules at compile time

Thành phần biên dịch Rust kiểm tra quy tắc sở hữu và mượn tại thời điểm biên dịch

A smart pointer that allocates data on the heap, providing owned access to a value of type T

Con trỏ thông minh cấp phát dữ liệu trên heap, cung cấp quyền sở hữu giá trị kiểu T

C

Rust's official build system and package manager for compiling, testing, and managing dependencies

Hệ thống xây dựng và quản lý gói chính thức của Rust để biên dịch, kiểm thử và quản lý phụ thuộc

A trait that allows explicit deep copying of a value, as opposed to implicit moves

Trait cho phép sao chép sâu giá trị một cách tường minh, khác với di chuyển ngầm

An anonymous function that captures variables from its enclosing scope

Hàm ẩn danh bắt giữ biến từ phạm vi bao quanh

A marker trait indicating a type can be duplicated by simple bitwise copy without move semantics

Trait đánh dấu cho biết kiểu có thể sao chép bằng sao chép bit đơn giản mà không cần ngữ nghĩa di chuyển

A compilation unit in Rust, either a library or a binary, managed by Cargo

Đơn vị biên dịch trong Rust, có thể là thư viện hoặc chương trình, được quản lý bởi Cargo

D

An attribute macro that auto-generates trait implementations for structs and enums

Macro thuộc tính tự động tạo triển khai trait cho struct và enum

A trait whose drop() method is called automatically when a value goes out of scope, used for cleanup

Trait có phương thức drop() được gọi tự động khi giá trị ra khỏi phạm vi, dùng để dọn dẹp

E

A type that can be one of several variants, each optionally holding data

Kiểu dữ liệu có thể là một trong nhiều biến thể, mỗi biến thể có thể chứa dữ liệu

F

Foreign Function Interface — mechanism for calling code written in other languages such as C

Giao diện hàm ngoại — cơ chế gọi mã viết bằng ngôn ngữ khác như C

A trait representing an asynchronous computation that will produce a value at some point

Trait biểu thị một phép tính bất đồng bộ sẽ tạo ra giá trị tại một thời điểm nào đó

G

A way to write code that works with multiple types using type parameters like <T>

Cách viết mã hoạt động với nhiều kiểu dữ liệu bằng tham số kiểu như <T>

H

A hash map collection that stores key-value pairs with O(1) average lookup time

Bộ sưu tập bảng băm lưu trữ cặp khóa-giá trị với thời gian tra cứu trung bình O(1)

I

Keyword used to define method implementations for a type or to implement a trait for a type

Từ khóa dùng để định nghĩa triển khai phương thức cho kiểu hoặc triển khai trait cho kiểu

A trait for types that produce a sequence of values one at a time via the next() method

Trait cho các kiểu tạo ra chuỗi giá trị từng cái một qua phương thức next()

L

A compile-time annotation (e.g. 'a) that tells the borrow checker how long references are valid

Chú thích tại thời điểm biên dịch (ví dụ 'a) cho bộ kiểm tra mượn biết tham chiếu hợp lệ bao lâu

M

Metaprogramming construct that generates code at compile time, invoked with ! (e.g. println!)

Cấu trúc siêu lập trình tạo mã tại thời điểm biên dịch, gọi bằng ! (ví dụ println!)

A control flow expression that compares a value against patterns and executes the matching arm

Biểu thức luồng điều khiển so sánh giá trị với các mẫu và thực thi nhánh khớp

A namespace that organizes code within a crate using the mod keyword

Không gian tên tổ chức mã trong crate bằng từ khóa mod

Keyword that marks a binding or reference as mutable, allowing its value to be changed

Từ khóa đánh dấu ràng buộc hoặc tham chiếu là có thể thay đổi

O

An enum representing an optional value: either Some(T) containing a value or None

Enum biểu thị giá trị tùy chọn: hoặc Some(T) chứa giá trị hoặc None

Rust's core memory management concept where each value has exactly one owner at a time

Khái niệm quản lý bộ nhớ cốt lõi của Rust, mỗi giá trị có đúng một chủ sở hữu tại một thời điểm

P

A macro that causes the program to terminate immediately with an error message, for unrecoverable errors

Macro khiến chương trình kết thúc ngay lập tức với thông báo lỗi, dùng cho lỗi không thể phục hồi

A mechanism for checking a value against patterns, used in match, if let, and while let

Cơ chế kiểm tra giá trị với các mẫu, dùng trong match, if let và while let

A wrapper that prevents a value from being moved in memory, required for self-referential futures

Trình bọc ngăn giá trị bị di chuyển trong bộ nhớ, cần thiết cho future tự tham chiếu

R

Raw Pointer

See: Unsafe Rust

An unsafe pointer (*const T or *mut T) that bypasses the borrow checker's safety guarantees

Con trỏ không an toàn (*const T hoặc *mut T) bỏ qua các đảm bảo an toàn của bộ kiểm tra mượn

Reference Counted smart pointer for shared ownership within a single thread

Con trỏ thông minh đếm tham chiếu để chia sẻ quyền sở hữu trong một luồng duy nhất

A type that enforces borrowing rules at runtime instead of compile time, enabling interior mutability

Kiểu kiểm tra quy tắc mượn tại thời điểm chạy thay vì biên dịch, cho phép khả biến nội tại

An enum for recoverable errors: either Ok(T) for success or Err(E) for failure

Enum cho lỗi có thể phục hồi: hoặc Ok(T) thành công hoặc Err(E) thất bại

S

Keyword referring to the current instance in method definitions (&self, &mut self, self)

Từ khóa tham chiếu đến thực thể hiện tại trong định nghĩa phương thức (&self, &mut self, self)

A marker trait indicating a type can be safely transferred between threads

Trait đánh dấu cho biết kiểu có thể chuyển giao an toàn giữa các luồng

A dynamically-sized view into a contiguous sequence of elements, like &[T] or &str

Một dạng xem kích thước động vào chuỗi phần tử liền kề, như &[T] hoặc &str

Smart Pointer

See: Smart Pointers

A data structure that acts like a pointer but also has metadata and capabilities like Drop and Deref

Cấu trúc dữ liệu hoạt động như con trỏ nhưng có thêm siêu dữ liệu và khả năng như Drop và Deref

A lifetime or storage duration that lasts for the entire program execution ('static)

Thời gian sống hoặc thời gian lưu trữ kéo dài suốt quá trình thực thi chương trình ('static)

A growable, heap-allocated, UTF-8 encoded string type, as opposed to the string slice &str

Kiểu chuỗi có thể mở rộng, cấp phát trên heap, mã hóa UTF-8, khác với slice chuỗi &str

A custom data type that groups related fields together into a named structure

Kiểu dữ liệu tùy chỉnh nhóm các trường liên quan lại thành cấu trúc có tên

A marker trait indicating a type can be safely referenced from multiple threads simultaneously

Trait đánh dấu cho biết kiểu có thể được tham chiếu an toàn từ nhiều luồng đồng thời

T

The most popular async runtime for Rust, providing task scheduling, I/O, and timer utilities

Runtime bất đồng bộ phổ biến nhất cho Rust, cung cấp lập lịch tác vụ, I/O và tiện ích hẹn giờ

A collection of methods that define shared behavior, similar to interfaces in other languages

Tập hợp phương thức định nghĩa hành vi chung, tương tự interface trong các ngôn ngữ khác

A dynamically dispatched reference (dyn Trait) that enables runtime polymorphism

Tham chiếu phân phối động (dyn Trait) cho phép đa hình tại thời điểm chạy

A fixed-size collection of values with potentially different types, like (i32, &str, bool)

Tập hợp giá trị kích thước cố định với các kiểu có thể khác nhau, như (i32, &str, bool)

Type Inference

See: Basic Concepts

The compiler's ability to deduce the type of a variable or expression without explicit annotation

Khả năng của trình biên dịch suy luận kiểu của biến hoặc biểu thức mà không cần chú thích tường minh

U

A keyword that disables certain compiler safety checks, allowing raw pointer dereference and FFI calls

Từ khóa vô hiệu hóa một số kiểm tra an toàn của trình biên dịch, cho phép giải tham chiếu con trỏ thô và gọi FFI

A method on Option/Result that returns the inner value or panics if None/Err

Phương thức trên Option/Result trả về giá trị bên trong hoặc panic nếu là None/Err

V

A growable, heap-allocated array type that stores elements of type T contiguously

Kiểu mảng có thể mở rộng, cấp phát trên heap, lưu trữ phần tử kiểu T liền kề nhau

Built: 4/8/2026, 12:01:11 PM