Skip to main content

libutils_issue/
mod.rs

1//^
2//^ HEAD
3//^
4
5//> HEAD -> NO_STD
6#![no_std]
7
8//> HEAD -> FEATURES
9#![feature(const_convert)]
10#![feature(const_trait_impl)]
11
12//> HEAD -> CRATES
13extern crate alloc;
14
15//> HEAD -> MODULES
16mod conversions;
17mod severity;
18#[cfg(test)]
19mod tests;
20
21//> HEAD -> ALLOC
22use alloc::string::String;
23
24//> HEAD -> SEVERITY
25pub use severity::Severity;
26
27//> HEAD -> CORE
28use core::hash::{
29    Hash,
30    Hasher
31};
32
33
34//^
35//^ ISSUE
36//^
37
38//> ISSUE -> STRUCT
39#[derive(Debug)]
40pub struct Issue {
41    pub name: &'static str,
42    pub description: Option<String>,
43    pub severity: Severity
44}
45
46//> ISSUE -> HASH
47impl Hash for Issue {
48    #[inline]
49    fn hash<H: Hasher>(&self, state: &mut H) {Hash::hash(self.name, state)}
50}