pub trait TwoWay: OneWay {
// Required method
fn other_way(
src: <Self as OneWay>::Dest,
) -> Result<<Self as OneWay>::Source>;
}Expand description
A trait for 2-way conversions that may fail.
Of course, for any x: Source, it should be the case that
other_way(one_way(x)?)? == x when possible, but this is not
required.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".