1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#![allow(unused_variables)]

use crate::models::*;

pub trait LineVisitor {
    type Error;

    fn visit_transaction_header<'a>(
        &mut self,
        header: TransactionHeader<'a>,
    ) -> Result<(), Self::Error> {
        Ok(())
    }

    fn visit_transaction_comment<'a>(&mut self, comment: Comment<'a>) -> Result<(), Self::Error> {
        Ok(())
    }

    fn visit_posting<'a>(&mut self, posting: Posting<'a>) -> Result<(), Self::Error> {
        Ok(())
    }

    /// This gets called when we encounter the end of the file.
    fn visit_end_of_file(&mut self) -> Result<(), Self::Error> {
        Ok(())
    }
}