-
Rust_slices]❤️String Literals Are Slices코딩Coding/★Rust★기초★Syntax 2022. 2. 25. 12:31728x90
The type of s here is &str: it’s a slice pointing to that specific point of the binary. This is also why string literals are immutable; &str is an immutable reference.
https://doc.rust-lang.org/stable/book/ch04-03-slices.html반응형'코딩Coding > ★Rust★기초★Syntax' 카테고리의 다른 글
Rust소유권 규칙Ownership Rules &Borrowing rules (0) 2022.02.28 Rust]메모리 주소를 벡터에 넣고 출력test해보기!) Print elements in a vector contiguously (0) 2022.02.27 Vec<String> or Vec<&str> for function argument? (0) 2022.02.26 WebGPU]Building WebGPU with Rust- Code Geek (0) 2022.02.25 Rust]❤️String ->as_bytes메소드를 이용해 바이트 배열로 변환 (0) 2022.02.25 Using unsafe 관련 글(The Rustonomicon=unsafe설명서Rust) -Reddit-learnrust (0) 2022.02.24 Rust]<What is a function signature and type? (0) 2022.02.23 Rust 27분 짜리 간단한 강의- Tim McNamara- Rist Linz (0) 2022.02.23