Trait timely::container::flatcontainer::IntoOwned
source · pub trait IntoOwned<'a> {
type Owned;
// Required methods
fn into_owned(self) -> Self::Owned;
fn clone_onto(self, other: &mut Self::Owned);
fn borrow_as(owned: &'a Self::Owned) -> Self;
}
Expand description
A reference type corresponding to an owned type, supporting conversion in each direction.
This trait can be implemented by a GAT, and enables owned types to be borrowed as a GAT.
This trait is analogous to ToOwned
, but not as prescriptive. Specifically, it avoids the
requirement that the other trait implement Borrow
, for which a borrow must result in a
&'self Borrowed
, which cannot move the lifetime into a GAT borrowed type.
Required Associated Types§
Required Methods§
sourcefn into_owned(self) -> Self::Owned
fn into_owned(self) -> Self::Owned
Conversion from an instance of this type to the owned type.
sourcefn clone_onto(self, other: &mut Self::Owned)
fn clone_onto(self, other: &mut Self::Owned)
Clones self
onto an existing instance of the owned type.
Object Safety§
This trait is not object safe.