Skip to main content

euv_cli/server/
const.rs

1/// The error message returned when the server is not yet ready.
2pub const ERROR_SERVER_NOT_READY: &str = "server not ready";
3
4/// The error message returned when the global state is initialized twice.
5pub const ERROR_GLOBAL_STATE_ALREADY_INITIALIZED: &str = "Global state already initialized";
6
7/// The suffix appended to the JS bridge stem to address the wasm binary.
8pub const WASM_FILE_SUFFIX: &str = "_bg.wasm";
9
10/// The error message for a failed read of a custom `index.html` template.
11pub const ERROR_READ_CUSTOM_INDEX_HTML: &str = "Failed to read custom index.html";
12
13/// The error message for a custom `index.html` that is not valid UTF-8.
14pub const ERROR_CUSTOM_INDEX_HTML_NOT_UTF8: &str = "Custom index.html is not valid UTF-8";
15
16/// The error message for a failed creation of the static serving directory.
17pub const ERROR_CREATE_STATIC_DIRECTORY: &str = "Failed to create static directory";
18
19/// The error message for a failed write of the generated `index.html`.
20pub const ERROR_WRITE_INDEX_HTML: &str = "Failed to write index.html";
21
22/// The route parameter name carrying the requested static-asset path.
23pub const ROUTE_PARAM_PATH: &str = "path";
24
25/// The HTTP scheme prefix.
26pub const HTTP_SCHEME: &str = "http";
27
28/// The Windows UNC path prefix.
29pub const WINDOWS_UNC_PREFIX: &str = r"\\?\";