Turbofish (::<>)
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
„Turbofish“-i ::<> i tregon Rust-it tipin kur s'e kupton dot vetë — p.sh. "5".parse::<i32>() ose .collect::<Vec<_>>(). Emri vjen nga forma që i ngjan një peshku.
EnglishEN
The “turbofish” ::<> tells Rust the type when it can't work it out — e.g. "5".parse::<i32>() or .collect::<Vec<_>>(). The name comes from its fish-like shape.
Si ta mendosh
Si t'i thuash kamerierit saktë „kafe pa sheqer“ kur s'e merr vesh vetë.
Lexoje në anglisht
Like telling the waiter exactly “coffee, no sugar” when they can't guess.
Shembull kodirust
let n = "42".parse::<i32>().unwrap();
let v = (1..4).collect::<Vec<_>>();