• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fpgaminer / fortress / 15284622765

27 May 2025 08:05PM UTC coverage: 88.68% (+0.4%) from 88.305%
15284622765

push

github

web-flow
Merge pull request #382 from fpgaminer/dependabot/cargo/sha2-0.10.9

Bump sha2 from 0.10.8 to 0.10.9

1653 of 1864 relevant lines covered (88.68%)

627.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

36.0
/libfortress/src/database_object/mod.rs
1
mod directory;
2
mod entry;
3

4
use serde::{Deserialize, Serialize};
5

6
pub use self::{
7
        directory::Directory,
8
        entry::{Entry, EntryHistory},
9
};
10

11
use super::ID;
12

13

14
#[derive(Serialize, Deserialize, Eq, PartialEq, Debug, Clone)]
15
#[serde(tag = "type")]
16
pub enum DatabaseObject {
17
        Entry(Entry),
18
        Directory(Directory),
19
}
20

21
impl DatabaseObject {
22
        pub fn get_id(&self) -> &ID {
369✔
23
                match *self {
369✔
24
                        DatabaseObject::Entry(ref e) => e.get_id(),
275✔
25
                        DatabaseObject::Directory(ref d) => d.get_id(),
94✔
26
                }
27
        }
369✔
28

29
        pub fn as_directory(&self) -> Option<&Directory> {
1✔
30
                match self {
1✔
31
                        DatabaseObject::Directory(d) => Some(d),
1✔
32
                        _ => None,
×
33
                }
34
        }
1✔
35

36
        pub fn as_directory_mut(&mut self) -> Option<&mut Directory> {
×
37
                match self {
×
38
                        DatabaseObject::Directory(d) => Some(d),
×
39
                        _ => None,
×
40
                }
41
        }
×
42

43
        pub fn as_entry(&self) -> Option<&Entry> {
×
44
                match self {
×
45
                        DatabaseObject::Entry(e) => Some(e),
×
46
                        _ => None,
×
47
                }
48
        }
×
49

50
        pub fn as_entry_mut(&mut self) -> Option<&mut Entry> {
×
51
                match self {
×
52
                        DatabaseObject::Entry(e) => Some(e),
×
53
                        _ => None,
×
54
                }
55
        }
×
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc