Borrow
, AsRef
, and Deref
are a little complicated, but they're well-worth understanding. Together, they give you tools for dealing with everything from HashMap
and friends to conversions involving smart pointer types to easily using String
and str
or Vec
and slice together.
AsRef
, Borrow
, and Deref
:
Borrow
and AsRef
in The Rust Programming Languagecollections::borrow::Borrow
std::convert::AsRef
std::ops::Deref
๐ 2017-01-09 15:03 / โ 00:08:38
๐ 2016-12-29 20:00 / โ 00:21:08
๐ 2016-11-12 19:26 / โ 00:07:42
๐ 2016-09-30 14:00 / โ 00:47:11
๐ 2016-09-10 19:50 / โ 00:10:19