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
28
29
30
31
32
33
use super::*;
impl NewEntryHeader {
pub fn header_seq_mut(&mut self) -> &mut u32 {
match self {
Self::Create(Create {
ref mut header_seq, ..
}) => header_seq,
Self::Update(Update {
ref mut header_seq, ..
}) => header_seq,
}
}
pub fn entry_data_mut(&mut self) -> (&mut EntryHash, &mut EntryType) {
match self {
Self::Create(Create {
ref mut entry_hash,
ref mut entry_type,
..
}) => (entry_hash, entry_type),
Self::Update(Update {
ref mut entry_hash,
ref mut entry_type,
..
}) => (entry_hash, entry_type),
}
}
pub fn entry_hash_mut(&mut self) -> &mut EntryHash {
self.entry_data_mut().0
}
}