From 23ba2aa42f92e43dfcfe560df47df4959da4414c Mon Sep 17 00:00:00 2001 From: Pavel Roskin <1317472+proski@users.noreply.github.com> Date: Fri, 12 Jan 2024 06:52:26 -0800 Subject: [PATCH] Glossary: add tuple, unit type, improve definition of enumeration (#1686) Co-authored-by: Dustin J. Mitchell --- src/glossary.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/glossary.md b/src/glossary.md index 6613463b..6af87fae 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -63,7 +63,8 @@ Also, please keep the hard line breaks to ensure a nice formatting. - crash:\ An unexpected and unhandled failure or termination of a program. - enumeration:\ - A data type that consists of named constant values. + A data type that holds one of several named constants, possibly with an + associated tuple or struct. - error:\ An unexpected condition or result that deviates from the expected behavior. - error handling:\ @@ -176,6 +177,9 @@ Also, please keep the hard line breaks to ensure a nice formatting. - trait bound:\ An abstraction where you can require types to implement some traits of your interest. +- tuple:\ + A composite data type that contains variables of different types. Tuple fields + have no names, and are accessed by their ordinal numbers. - type:\ A classification that specifies which operations can be performed on values of a particular kind in Rust. @@ -190,6 +194,8 @@ Also, please keep the hard line breaks to ensure a nice formatting. - unit test:\ Rust comes with built-in support for running small unit tests and larger integration tests. See [Unit Tests](testing/unit-tests.html). +- unit type:\ + Type that holds no data, written as a tuple with no members. - unsafe:\ The subset of Rust which allows you to trigger _undefined behavior_. See [Unsafe Rust](unsafe.html).