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
TakeReftrait for Rust enables treating references and values interchangeably. - Take
Slice - The
TakeSlicetrait for Rust enables treating slices andVecinstances interchangeably. - Take
String - The
TakeStringtrait for Rust enables treating&strandStringinstances interchangeably.