pub trait TryNew {
type Value;
// Required method
fn try_new(value: Self::Value) -> Result<Self, OutOfMemory>
where Self: Sized;
}Expand description
Extension trait providing fallible allocation for types like Arc<T> and
Box<T>.
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Source§impl<T> TryNew for Arc<T>
XXX: Stable Rust doesn’t actually give us any method to build fallible
allocation for Arc<T>, so this is only actually fallible when using
nightly Rust and setting RUSTFLAGS="--cfg arc_try_new".
impl<T> TryNew for Arc<T>
XXX: Stable Rust doesn’t actually give us any method to build fallible
allocation for Arc<T>, so this is only actually fallible when using
nightly Rust and setting RUSTFLAGS="--cfg arc_try_new".