hwp/hwp/paragraph/
range_tag.rs1use std::io::Read;
2
3use byteorder::{LittleEndian, ReadBytesExt};
4
5#[derive(Debug, Clone)]
6pub struct RangeTag {
7 pub start_position: u32,
9 pub end_position: u32,
11 pub tag: u32,
16}
17
18impl RangeTag {
19 pub fn from_reader<T: Read>(reader: &mut T) -> Self {
20 let start_position = reader.read_u32::<LittleEndian>().unwrap();
21 let end_position = reader.read_u32::<LittleEndian>().unwrap();
22 let tag = reader.read_u32::<LittleEndian>().unwrap();
23
24 Self {
25 start_position,
26 end_position,
27 tag,
28 }
29 }
30}