try_clone

Function try_clone 

Source
pub fn try_clone<T: TryClone>(o: &T) -> Result<T, T::Error>
Expand description

Creates a new instance of a value by fallibly cloning it.

This is a convenience wrapper around TryClone::try_clone.

ยงErrors

Returns an error if the underlying cloning operation fails.