Rust book: operators, overload traits, and non-operator symbols
Answer: Appendix B of the Rust book is a glossary of Rust syntax: operators, whether they can be overloaded, and symbols that are not operators.
Operators
The appendix lists operators and other symbols that appear by themselves or in paths, generics, trait bounds, macros, attributes, comments, tuples, and brackets.
Table B-1 shows each operator, an example in context, a short explanation, and whether it is overloadable, plus the trait to use if so.
! is used for macro expansion, and !expr is bitwise or logical complement, overloadable with Not. * is arithmetic multiplication, dereference (Deref), or a raw pointer type.
& borrows a value or names a borrowed pointer type, and can also be bitwise AND (BitAnd). && is short-circuiting logical AND.
+ is arithmetic addition (Add). - is subtraction (Sub) or negation (Neg). % is remainder (Rem). += is addition and assignment (AddAssign).
. reaches a field, calls a method, or indexes a tuple. -> writes a function or closure return type.
Non-operator symbols
Further tables list symbols that do not function as operators; they do not behave like a function or method call.
Table B-2 covers stand-alone syntax. 'ident is a named lifetime or loop label. Digits immediately followed by a type suffix such as u8, i32, f64, or usize are a numeric literal of that type.
Table B-2 also lists raw strings, byte strings, and raw byte strings.
See also
Claims
- id: C1 claim: The appendix is a glossary of Rust syntax, including operators and other symbols. source: S1 evidence: "a glossary of Rust's syntax, including operators and"
- id: C2 claim: Table B-1 lists each operator, an example, an explanation, and whether it is overloadable. source: S2 evidence: "Table B-1 contains the operators in Rust"
- id: C3 claim: Later tables list symbols that do not function as operators. source: S2 evidence: "symbols that don't function as operators"
Sources
- [S1] Appendix B: Operators and Symbols. The Rust Project Developers. https://doc.rust-lang.org/book/appendix-02-operators.html . License: MIT OR Apache-2.0. Accessed 2026-11-27.
- [S2] Appendix B: Operators and Symbols (source). The Rust Project Developers. https://raw.githubusercontent.com/rust-lang/book/main/src/appendix-02-operators.md . License: MIT OR Apache-2.0. Accessed 2026-11-27.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Rust Project Developers, Appendix B: Operators and Symbols; The Rust Project Developers, Appendix B: Operators and Symbols (source). MIT OR Apache-2.0 (https://raw.githubusercontent.com/rust-lang/book/main/LICENSE-MIT). Copyright the Rust Project Developers. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: The Rust Project Developers, Appendix B: Operators and Symbols; The Rust Project Developers, Appendix B: Operators and Symbols (source). MIT OR Apache-2.0 (https://raw.githubusercontent.com/rust-lang/book/main/LICENSE-MIT). Copyright the Rust Project Developers.
Cite this
iinventedlight. 2026. "Rust book: operators, overload traits, and non-operator symbols." iinventedlight Library, iil:note:vf7y9bdj, version of 2026-11-27. https://iinventedlight.com/library/notes/rust-operators/. License: CC-BY-4.0.
@misc{iil_note_vf7y9bdj,
author = {{iinventedlight}},
title = {{Rust book: operators, overload traits, and non-operator symbols}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-27},
url = {https://iinventedlight.com/library/notes/rust-operators/},
note = {Permanent ID iil:note:vf7y9bdj. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- rust-operators.schema.json (schema; CC-BY-4.0)
- rust-operators.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/rust-operators.md.