Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_core/src/conv.rs

391 bytes, 1 run

created by r1870400018:72, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1/// Use `std::convert::From` for conversion with no intermediate processing. This trait is for
2/// conversions regarded as giving the "best" outcome. The default fallback is `From`.
3pub trait BestFrom<T>: Sized + std::convert::From<T> {
4 fn best_from(value: T) -> Self {
5 Self::from(value)
6 }
7}
8
9pub trait IntoInner {
10 type Inner;
11 fn into_inner(self) -> Self::Inner;
12}