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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate serde_derive;
pub mod config;
pub mod error;
pub mod id;
pub mod loaded;
pub mod log;
pub mod validation;
pub mod version;
use std::any::Any;
use crate::error::Error;
use crate::log::{Log, Logger};
pub mod prelude {
#[cfg(feature = "mammoth_module")]
pub use mammoth_macro::mammoth_module;
pub use crate::MammothInterface;
pub use crate::error::Error;
pub use crate::error::severity::Severity;
pub use crate::log::{Log, Logger, AsyncLoggerReference};
pub use toml::Value;
pub use semver;
}
pub trait MammothInterface: Any + Send + Sync + Log {
fn on_load(&self) {}
fn on_validation(&self, _: &mut Logger) -> Result<(), Error>;
fn on_shutdown(&self) {}
}