사용자 정의 자료형
러스트의 사용자 정의 자료형은 두개의 키워드로 만듭니다.
struct
: 구조체enum
: 열거형
상수의 경우에는 const
와 static
키워드로 생성합니다.
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
러스트의 사용자 정의 자료형은 두개의 키워드로 만듭니다.
struct
: 구조체enum
: 열거형상수의 경우에는 const
와 static
키워드로 생성합니다.