ninja-files-data 0.1.0

Core data structures for ninja files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{InvalidVariableId, VariableId};

impl TryFrom<String> for VariableId {
    type Error = InvalidVariableId;

    fn try_from(value: String) -> Result<Self, Self::Error> {
        VariableId::try_create(value)
    }
}

impl TryFrom<&'static str> for VariableId {
    type Error = InvalidVariableId;

    fn try_from(value: &'static str) -> Result<Self, Self::Error> {
        VariableId::try_create(value)
    }
}