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