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
use semver::SemVerError;
use thiserror::Error as ThisError;
use std::str::Utf8Error;
#[derive(Debug, ThisError, PartialEq)]
pub enum ManifestError {
#[error(
"{0} can't be read: embedded manifest doesn't contain enough bytes to read field size from prefix"
)]
NotEnoughBytesForPrefix(&'static str),
#[error(
"{0} can't be read: embedded manifest doesn't contain enough bytes to read field of size {1}"
)]
NotEnoughBytesForField(&'static str, usize),
#[error("{0} is an invalid Utf8 string: {1}")]
FieldNotValidUtf8(&'static str, Utf8Error),
#[error("{0} has too big size: {1}")]
TooBigFieldSize(&'static str, u64),
#[error("embedded to the Wasm file version is corrupted: '{0}'")]
ModuleVersionCorrupted(#[from] SemVerError),
#[error("embedded manifest is corrupted: there are some trailing characters")]
ManifestRemainderNotEmpty,
#[error("build time can't be parsed: {0}")]
DateTimeParseError(#[from] chrono::ParseError),
}