b'Three traits which are essential for designing good, Rustic APIs.\\n
\\n
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.\\nAsRef
, Borrow
, and Deref
:\\nBorrow
and AsRef
in The Rust Programming Languagecollections::borrow::Borrow
std::convert::AsRef
std::ops::Deref