mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-07-07 19:47:15 -06:00
.gitea
.github
.obsidian
HelloWorld
actix_web_learning
adder
branches
functions_rust
guessing_game
hello_cargo
loops
minigrep
ownership
rectangles
.gitignore
Cargo Workspaces.md
Cargo and Cratesio.md
Closures.md
Collection of Common Data Structs.md
Constants.md
Crates.md
Custome Build Profiles.md
Data Types.md
Deref Trait.md
Drop Trait.md
Enums.md
Error Handling.md
Extending Cargo.md
For later baja.md
Generic Types Traits and Lifetimes.md
Generics.md
Hash.md
Improving The IO Project.md
Install Binaries.md
Iterators and Closures.md
Iterators.md
Lifetimes.md
Modules and Use.md
Packages.md
Paths.md
Primitives.md
Project Organization.md
Publishing libraries.md
README.md
Reducing_Code_Duplication.md
Reference Counter Smart Pointer.md
RustBrock.code-workspace
Smart Pointers.md
String.md
Structures.md
Test Controls.md
Test_Organization.md
Tests.md
The Performance Closures and Iterators.md
Traits.md
Using Box on the Heap.md
Variables.md
Vector.md
Writing_Tests.md
data_types.md
ownership.md
368 B
368 B
Constants
- Can be declared anywhere,
- The convention to use all caps in a constant's name
- Needs const keyword
- Not always evaluated at compile time (there are rules for this but too complex to know everything)
- Variables can only be assigned once (needs mut to assign more than once (need to be same type))
const SECONDS_PER_HOUR: i32 = 60 * 60;