TryConvert

Trait TryConvert 

Source
pub trait TryConvert<T> {
    // Required method
    fn try_convert(&self) -> Option<T>;
}
Expand description

A trait for types that can be converted to another type.

Required Methods§

Source

fn try_convert(&self) -> Option<T>

Try to convert the value to the target type.

Implementors§

Source§

impl<T: Copy> TryConvert<T> for T