Expand description
Process environment directories and unique name.
§Crate
This crate is part of the zng project.
§Cargo Features
This crate provides 1 feature flag, not enabled by default.
§"built_res"
Check if res path is available in init_built_res first.
Enabled by default in debug builds, ignored in Android and Wasm.
Macros§
- Inits process metadata, calls process start handlers and defines the process lifetime in
main. - Register a
FnOnce(&ProcessStartArgs)closure to be called oninit!.
Structs§
- Metadata about the app and main crate.
- Arguments for
on_process_exithandlers. - Arguments for
on_process_starthandlers.
Enums§
- Defines the state of the current process instance.
Functions§
- Gets metadata about the application.
- Helper function for adapting Android assets to the cross-platform
resAPI. - Panics with an standard message if
zng::env::init!()was not called or was not called correctly. - Gets a path relative to the package binaries.
- Gets a path relative to the cache directory for the app.
- Removes all cache files possible.
- Gets a path relative to the user config directory for the app.
- Terminates the current process with the specified exit code.
- Sets a custom path for the “built resources” override checked by
resin debug builds. - Sets a custom
cachepath. - Sets a custom
original_configpath. - Sets a custom
respath. - Save
new_pathas the new cache path and make a best effort to move existing cache files. - Copied all config to
new_pathand saves it as the config path. - Register a
handlerto run once when the current process exits. - Config path before migration.
- Get the state of the current process instance.
- Gets a path relative to the package resources.