problemo/problem/into.rs
1use super::problem::*;
2
3use std::error::*;
4
5//
6// IntoProblem
7//
8
9/// Into a [Problem].
10pub trait IntoProblem {
11 /// Into a [Problem].
12 fn into_problem(self) -> Problem;
13}
14
15impl<ErrorT> IntoProblem for ErrorT
16where
17 ErrorT: 'static + Error + Send + Sync,
18{
19 #[track_caller]
20 fn into_problem(self) -> Problem {
21 self.into()
22 }
23}