#[non_exhaustive]pub enum Requirement {
Tool {
dependency: Dependency,
},
ComposePlugin,
EngineRunning,
Hypervisor {
provider: Provider,
},
VagrantPlugin {
provider: Provider,
},
Ovftool,
}Expand description
One thing a run needs on this computer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tool
A tool a setup installs (Dependency), not a hypervisor (that is
Requirement::Hypervisor).
Fields
dependency: DependencyThe tool.
ComposePlugin
Docker’s Compose plugin (docker compose), which comes with the engine’s install.
EngineRunning
The container engine answering: started, not installed.
Hypervisor
A hypervisor, installed and usable here as its provider’s detection says.
VagrantPlugin
The Vagrant plugin a provider runs through (Provider::plugin), at a version that
works.
Ovftool
VMware’s OVF Tool, which ESXi’s VMs are uploaded with (crate::tools::ovftool).
Implementations§
Source§impl Requirement
impl Requirement
Sourcepub fn for_program(program: &str) -> Option<Requirement>
pub fn for_program(program: &str) -> Option<Requirement>
What a tool that isn’t on PATH is, by its program’s name as the runner says it
(docker, VBoxManage); none for a program no requirement installs.
Sourcepub fn of_error(error: &Error) -> Option<Requirement>
pub fn of_error(error: &Error) -> Option<Requirement>
The requirement a run’s failure says is missing: a tool not on PATH
(Error::ToolMissing), or the container engine not answering
(Error::ToolUnanswered of docker); none for any other failure.
Sourcepub fn of_detail(detail: &Detail) -> Option<Requirement>
pub fn of_detail(detail: &Detail) -> Option<Requirement>
The same, from a failure’s detail as an event or a report carries it.
Trait Implementations§
Source§impl Clone for Requirement
impl Clone for Requirement
impl Copy for Requirement
Source§impl Debug for Requirement
impl Debug for Requirement
Source§impl<'de> Deserialize<'de> for Requirement
impl<'de> Deserialize<'de> for Requirement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Requirement
Source§impl Hash for Requirement
impl Hash for Requirement
Source§impl PartialEq for Requirement
impl PartialEq for Requirement
Source§impl Serialize for Requirement
impl Serialize for Requirement
impl StructuralPartialEq for Requirement
Source§impl TS for Requirement
impl TS for Requirement
Source§type WithoutGenerics = Requirement
type WithoutGenerics = Requirement
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 = Requirement
type OptionInnerType = Requirement
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 Requirement
impl Freeze for Requirement
impl Move for Requirement
impl RefUnwindSafe for Requirement
impl Send for Requirement
impl Sync for Requirement
impl Unpin for Requirement
impl UnsafeUnpin for Requirement
impl UnwindSafe for Requirement
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.