Safety-Critical Rust Coding Guidelines

Contents:

  • Introduction
  • Overview
  • Coding Guidelines
    • Types and Traits
      • Ensure reads of union fields produce valid values for the field’s type
      • Use strong types to differentiate between logically distinct values
    • Patterns
    • Expressions
    • Values
    • Statements
    • Functions
    • Associated Items
    • Implementations
    • Generics
    • Attributes
    • Entities And Resolution
    • Ownership And Destruction
    • Exceptions And Errors
    • Concurrency
    • Program Structure And Compilation
    • Unsafety
    • Macros
    • Ffi
    • Inline Assembly
  • Compliance
  • Process
  • Appendices
  • Retired Guidelines
Safety-Critical Rust Coding Guidelines
  • Coding Guidelines
  • Types and Traits
  • View page source

Types and Traits

  • Ensure reads of union fields produce valid values for the field’s type
  • Use strong types to differentiate between logically distinct values
Previous Next

© Copyright 2025, Contributors to Coding Guidelines Subcommittee.

Built with Sphinx using a theme provided by Read the Docs. This site is powered through Netlify.