kutil_std/borrow/
into_owned.rs

1//
2// IntoOwned
3//
4
5/// Into owned.
6///
7/// Note the difference between this and [ToOwned]: here `self` is moved rather than referenced.
8/// This allows implementations to avoid allocation when unnecessary. For example, if we are
9/// already owned then we can return `self`.
10pub trait IntoOwned {
11    /// Into owned.
12    fn into_owned(self) -> Self;
13}