pub enum Action {
Install {
dependency: Dependency,
interactions: Vec<Interaction>,
},
Plugin {
plugin: String,
},
StartEngine {
engine: Engine,
},
UseEngine {
engine: Engine,
},
Restart {
feature: WindowsFeature,
},
ShareVirtualization {
interactions: Vec<Interaction>,
},
Relogin,
Manual {
interactions: Vec<Interaction>,
reason: ManualReason,
dependency: Option<Dependency>,
url: Option<String>,
},
Blocked {
reason: Unavailable,
},
}Expand description
One thing a setup does, or leaves to its user, on this computer.
Variants§
Install
Installs dependency (crate::install): the container engine, WSL 2, Vagrant, a
hypervisor, the Vagrant VMware Utility.
Fields
dependency: DependencyThe tool to install.
interactions: Vec<Interaction>What its install asks of the person at the computer (crate::install::interactions),
for a UI to say before it runs.
Plugin
Installs the Vagrant plugin plugin (crate::install::vagrant_plugin).
StartEngine
Starts the installed engine engine.
UseEngine
Points Docker at engine, which runs already (docker::use_engine).
Restart
Restarts the computer, which finishes turning feature on.
Fields
feature: WindowsFeatureThe feature the restart starts.
Lets VirtualBox share the CPU’s virtualization with KVM (Linux), which holds it as soon as
its module loads (Unavailable::KvmHoldsVirtualization): KVM set to take it only while
one of its own VMs runs (share_virtualization), as root. It applies at once when
nothing uses KVM, else from the next restart (Unavailable::KvmSharesAfterRestart).
Relogin
Signs out and back in: a group the account was added to (Linux’s docker, libvirt and
kvm, the libvirt and QEMU installs’ too) applies from the next login.
Manual
Not something a setup does here: its user gets it (dependency, when it is one a setup
installs elsewhere; from url, when there is one), then checks the machine again.
Fields
interactions: Vec<Interaction>What it asks of them: a vendor’s download by hand (Interaction::DownloadByHand),
for a UI to link to.
reason: ManualReasonWhy it is the user’s to get.
dependency: Option<Dependency>The tool, when it is one a setup installs elsewhere.
Blocked
Installed, but it can’t run here, and nothing a setup installs mends that: reason.
Fields
reason: UnavailableWhy it can’t run here, as a code a UI says in its own words.
Implementations§
Source§impl Action
impl Action
Sourcepub fn ends_pass(&self) -> bool
pub fn ends_pass(&self) -> bool
Whether it ends a setup pass: what follows waits for the restart or the new login. A hypervisor blocked until the computer restarts (VirtualBox’s driver, built for the newer kernel its install brought; KVM set to share the CPU’s virtualization from its next load) ends it too, as a restart.
Sourcepub fn interactions(&self) -> Vec<Interaction>
pub fn interactions(&self) -> Vec<Interaction>
What it asks of the person at the computer, in order: an install’s or KVM’s sharing’s (a password prompt, a licence, a setting to allow), a restart’s or a new login’s itself. Empty when it asks nothing.
Trait Implementations§
impl Eq for Action
impl StructuralPartialEq for Action
Source§impl TS for Action
impl TS for Action
Source§type WithoutGenerics = Action
type WithoutGenerics = Action
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = Action
type OptionInnerType = Action
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Forget for Action
impl Freeze for Action
impl Move for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Actionwhere
RawVecInner: Sync,
impl Unpin for Action
impl UnsafeUnpin for Actionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Interaction>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for Action
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.