Expand description
A version of the ToOwned
trait describing generalized references
from which an owned form can be cloned.
The obvious instances for str
, Path
, OsStr
, CStr
,
slices as well as sized types implementing Clone
are implemented
out of the box.
Clone the thing denoted by a generalized reference into one that
is owned without consuming the reference.
Clone the thing denoted by a generalized reference into one that
is owned.
This trait function defaults to calling to_owned
but is there as an optimization opportunity, if needed.