1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use torin::position::Position;

use crate::{
    Parse,
    ParseError,
};

impl Parse for Position {
    fn parse(value: &str) -> Result<Self, ParseError> {
        Ok(match value {
            "absolute" => Position::new_absolute(),
            "fixed" => Position::new_fixed(),
            _ => Position::Stacked,
        })
    }
}