Как стать автором
Обновить
2
0

Пользователь

Отправить сообщение

How does Rust treat Strings and Vectors internally

Время на прочтение4 мин
Количество просмотров3.1K

In Rust strings can be represented in two ways:

a)       String type

b)      String slice

String type:

String type is defined as a struct of the following structure:

Depending on arch (in my case x86 64bit it is 24byte)

{

   pointer to the address where string characters are stored (8b)

   capacity (8b)

   length (8b)

}

Read more
Всего голосов 4: ↑4 и ↓0+4
Комментарии0

Информация

В рейтинге
Не участвует
Зарегистрирован
Активность