Standard Library
러스트는 러스트 라이브러리와 프로그램에서 사용되는 공통 타입을 설정하는 데 도움을 주는 표준 라이브러리와 함께 제공 됩니다. 이렇게 하면 두 라이브러리 모두 같은 String 타입을 사용하기 때문에 원활하게 함께 작동할 수 있습니다.
Rust comes with a standard library which helps establish a set of common types used by Rust library and programs. This way, two libraries can work together smoothly because they both use the same
Stringtype.
일반적인 타입은 아래와 같습니다:
The common vocabulary types include:
OptionandResult타입: 선택적 옵션 값과 error handling에 사용됩니다.String: 소유 데이터에서 사용되는 기본적인 문자열 타입입니다.Vec: 확장가능한 표준 벡터 타입입니다.HashMap: 구성 가능한 해시 알고리즘을 가지는 해쉬 맵 타입입니다Box: 힙에 할당된 데이터에 대한 소유 포인터입니다.Rc: 힙에 할당된 데이터에 대한 참조 카운팅 공유 포인트입니다.
OptionandResulttypes: used for optional values and error handling.String: the default string type used for owned data.Vec: a standard extensible vector.HashMap: a hash map type with a configurable hashing algorithm.Box: an owned pointer for heap-allocated data.Rc: a shared reference-counted pointer for heap-allocated data.