Expand description
§take_ref
take_ref provides the TakeRef
, TakeSlice
, and TakeString
traits
to enable treating values and their reference/slice types interchangeably
until the moment taking ownership is required.
If taking ownership is required sometimes but not always,
this can eliminate the need to always copy data from reference types.
Traits§
- TakeRef
- The
TakeRef
trait for Rust enables treating references and values interchangeably. - Take
Slice - The
TakeSlice
trait for Rust enables treating slices andVec
instances interchangeably. - Take
String - The
TakeString
trait for Rust enables treating&str
andString
instances interchangeably.