pub struct Mode(_);
Expand description
The dependency interface exposed to CLI main
Implementations§
source§impl Mode
impl Mode
pub fn new(t: ModeType) -> Self
sourcepub fn prepare_state(
&self,
build_dir: &Path,
storage_dir: &Path
) -> Result<OnDiskStateView>
pub fn prepare_state( &self, build_dir: &Path, storage_dir: &Path ) -> Result<OnDiskStateView>
Prepare an OnDiskStateView that is ready to use. Library modules will be preloaded into the
storage if load_libraries
is true.
NOTE: this is the only way to get a state view in Move CLI, and thus, this function needs
to be run before every command that needs a state view, i.e., check
, publish
, run
,
view
, and doctor
.