1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{Result, Tape, Walue};

index! {
    @define
    #[doc = "A char-string index."]
    pub CharStrings
}

impl Walue for CharStrings {
    type Parameter = i32;

    fn read<T: Tape>(tape: &mut T, format: i32) -> Result<Self> {
        Ok(match format {
            2 => CharStrings(tape.take()?),
            _ => raise!("found an unknown char-string format"),
        })
    }
}