Search⌘ K

Summary

Explore how Rust methods work including their syntax and type inference. Understand using explicit types, numerical readability with underscores, method chaining, and how to declare methods with self parameters. This lesson prepares you to write clearer and more expressive Rust code.

We'll cover the following...
  • Method calls are another type of expression, very similar to function and macro calls

  • Sometimes in Rust, such as with method calls, we have to help the compiler know exactly what type we’re using ...