Trait rune_alloc::borrow::TryToOwned
source · pub trait TryToOwned {
type Owned: Borrow<Self>;
// Required method
fn try_to_owned(&self) -> Result<Self::Owned, Error>;
}Expand description
A generalization of TryClone to borrowed data.
Some types make it possible to go from borrowed to owned, usually by
implementing the TryClone trait. But TryClone works only for going from
&T to T. The ToOwned trait generalizes TryClone to construct owned
data from any borrow of a given type.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.