変換
プリミティブ型は、キャストによって相互に変換できます。
Rust は、トレイトを使用してカスタム型(すなわち、struct と enum)間の変換に 対応します。汎用的な 変換では、From と Into トレイトを使用します。ただし、より一般的なケース、特に String への変換および String からの変換には、より具体的なものがあります。
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