gedcom_rs/types/object.rs
1// use crate::types::Line;
2
3// use nom::{bytes::complete::is_not, IResult};
4
5// 0 @M1@ OBJE
6// 1 FILE photo.jpeg
7// 2 FORM JPEG
8// 3 TYPE photo
9// 2 TITL Picture of the book cover
10// 1 REFN 01234567890123456789
11// 2 TYPE reference
12// 1 RIN 1
13// 1 NOTE Here are some notes on this multimedia object.
14// 2 CONT If decoded it should be an image of a flower.
15// 1 NOTE @N1@
16// 1 CHAN
17// 2 DATE 14 JAN 2001
18// 3 TIME 14:10:31
19
20#[derive(Debug, Eq, PartialEq, Clone, Copy)]
21pub struct Object<'a> {
22 pub xref: &'a str,
23}
24
25impl<'b> Object<'b> {
26 pub fn parse(_record: &str) -> Object {
27 // let mut object = Object { xref: "" };
28
29 // while !record.is_empty() {
30 // let (buffer, line) = Line::parse(&record).unwrap();
31
32 // // If we're at the top of the record, get the xref
33 // // && level == 0
34 // match line.level {
35 // 0 => {
36 // object.xref = line.xref;
37 // }
38 // _ => {
39 // }
40 // }
41 // }
42 // object
43 Object { xref: "" }
44 }
45}