rust-lib/src/traits.rs
2024-06-27 11:49:41 +02:00

6 lines
138 B
Rust

/// Converts a type T into a Result<T, E>
pub trait IntoResult<T> {
type Error;
fn into_result(self) -> Result<T, Self::Error>;
}