1use crate::types::{ObjectType, OffsetState, Section};
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct Entry {
5 pub dump_id: i32,
6 pub had_dumper: bool,
7 pub table_oid: String,
8 pub oid: String,
9 pub tag: Option<String>,
10 pub desc: ObjectType,
11 pub section: Section,
12 pub defn: Option<String>,
13 pub drop_stmt: Option<String>,
14 pub copy_stmt: Option<String>,
15 pub namespace: Option<String>,
16 pub tablespace: Option<String>,
17 pub tableam: Option<String>,
18 pub relkind: Option<char>,
19 pub owner: Option<String>,
20 pub with_oids: bool,
21 pub dependencies: Vec<i32>,
22 pub data_state: OffsetState,
24 pub offset: u64,
26 pub filename: Option<String>,
28}
29
30impl Entry {
31 pub fn computed_section(&self) -> Section {
36 self.desc.section()
37 }
38}