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
51
52
53
54
55
56
57
58
59
60
61
62
63
use std::{error::Error, fmt};
pub static ERRORS: [&[u8]; 12] = [
b"Plugin OK\0",
b"Undefined error\0",
b"Plugin failed to initialize\0",
b"Attribute does not exist\0",
b"Attribute types do not match\0",
b"Attribute cannot be set\0",
b"IO operation failed\0",
b"Could not convert numeric value into a different type\0",
b"The plugin encountered a null pointer\0",
b"The plugin attribute's callback failed\0",
b"Could not update plugin attribute's cached value\0",
b"Unrecognized lifecycle phase\0",
];
#[derive(Debug)]
pub struct PluginUninitializedError {}
impl Error for PluginUninitializedError {}
impl fmt::Display for PluginUninitializedError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "PluginUninitializederror")
}
}
pub mod error_codes {
use libc::c_int;
pub const PLUGIN_OK: c_int = 0;
pub const UNDEFINED_ERR: c_int = 1;
pub const PLUGIN_INIT_ERR: c_int = 2;
pub const ATTRIBUTE_DOES_NOT_EXIST: c_int = 3;
pub const ATTRIBUTE_TYPE_MISMATCH: c_int = 4;
pub const ATTRIBUTE_IS_NOT_SETTABLE: c_int = 5;
pub const IO_ERR: c_int = 6;
pub const NUMERIC_CONVERSION_ERR: c_int = 7;
pub const NULL_PTR_ERR: c_int = 8;
pub const CALLBACK_ERR: c_int = 9;
pub const UPDATE_CACHED_VALUE_ERR: c_int = 10;
pub const LIFECYCLE_PHASE_ERR: c_int = 11;
}