← All notes

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

Sources

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

Permanent ID: iil:note:vf7y9bdj

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.},
}

Markdown

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.

All artifact files (JSON index)

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.