pub trait Emplace<T>: Sized + Deref {
type Output: Deref<Target = Self::Target>;
// Required method
fn try_emplace<N: TryNew<Output = T>>(
new: N
) -> Result<Self::Output, N::Error>;
// Provided method
fn emplace<N: New<Output = T>>(new: N) -> Self::Output { ... }
}
Expand description
Operations for constructing New
values into a Self::Output
instance.
Required Associated Types§
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.