or_drop

Function or_drop 

Source
pub fn or_drop<T>(x: T) -> Result<Box<T>, Error>
Expand description

Attempt to move x to a heap allocation, immediately dropping x on failure, and returning a useful Error.

See crate documentation for more.