Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Converting between types: The From and Into traits

  • from
  • into

You have probably seen code using ::from() or .into() in some code. These are methods of the From and Into traits. You always implement only one of them.