Rust has a convenient method to facilitate conversion between different types: the trait From (and Into) which defines an "interface" to convert an element to an other.
pub trait From<T> {
fn from(T) -> Self;
}
Is it possible to implement an equivalent of the From trait with Java functional interfaces?