ninja_files_data2/process/try_from.rs
1use crate::{InvalidProcess, Process};
2
3impl TryFrom<String> for Process {
4 type Error = InvalidProcess;
5
6 fn try_from(value: String) -> Result<Self, Self::Error> {
7 Process::try_create(value)
8 }
9}
10
11impl TryFrom<&str> for Process {
12 type Error = InvalidProcess;
13
14 fn try_from(value: &str) -> Result<Self, Self::Error> {
15 Process::try_create(value)
16 }
17}