#[non_exhaustive]pub enum Error {
Show 50 variants
NotFound(PathBuf),
Ambiguous(PathBuf),
Read {
path: PathBuf,
source: Error,
},
Yaml(Error),
Invalid {
file: String,
problems: Vec<Problem>,
},
SetShape {
set: String,
},
SetKey {
set: String,
},
Name {
what: &'static str,
value: String,
rule: &'static str,
},
UnknownOs {
text: String,
known: String,
},
UnknownOsVersion {
family: &'static str,
version: String,
known: String,
default: &'static str,
},
Placeholder {
path: String,
why: &'static str,
},
Unclosed,
NotHere {
reference: Reference,
why: &'static str,
},
Mode(String),
ServiceAndApp,
WithWithoutService,
ConfigWithoutAppliance,
ImageAndBuild,
ApplianceBuild,
FirmwareWithoutDynamips,
NoRecipe,
DynamipsImage,
DynamipsFirmware,
ApplianceFirmware,
ApplianceImage,
TestAndHttp,
NoHealthProbe,
NoFileSource,
FileSources(Vec<&'static str>),
EnvReference,
GpuCount(String),
GpusWord(String),
Device(String),
Layer {
path: PathBuf,
source: Error,
},
Defaults {
sources: String,
source: Error,
},
Images(Error),
ProfileName(String),
NoProfile {
name: String,
folder: PathBuf,
known: Vec<String>,
},
TwoProfiles {
name: String,
},
ProfileYaml {
name: String,
path: PathBuf,
source: Error,
},
ProfileMapping {
name: String,
path: PathBuf,
key: &'static str,
},
ProfileInput {
name: String,
path: PathBuf,
input: String,
},
ProfileMismatch {
problems: Vec<ProfileProblem>,
},
ProfileTarget {
profile: String,
target: Target,
asked: String,
},
InstanceNumber(u8),
InstanceName(String),
Cidr(String),
Cidr6(String),
InstancePort {
machine: String,
port: u16,
instance: u8,
},
InstanceIpv6 {
network: String,
cidr: String,
instance: u8,
},
}Expand description
Why a spec, a file beside it or a value in it isn’t one Isoloom reads.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound(PathBuf)
The folder has no spec file.
Ambiguous(PathBuf)
Both isoloom.yml and isoloom.yaml exist: which one is meant is ambiguous.
Read
A file exists but couldn’t be read.
Yaml(Error)
Not YAML: the spec’s text before its overrides, or a profile’s spec it merges. The message carries the line and column.
Invalid
The spec’s problems: every one found, coded and placed, in file order.
Fields
SetShape
A -s that isn’t key=value.
SetKey
A -s whose key isn’t a dotted path.
Name
A name that breaks its rule.
Fields
UnknownOs
An OS no family names.
UnknownOsVersion
A known OS family without that version.
Fields
Placeholder
A {{ path }} placeholder whose path the grammar doesn’t have.
Unclosed
A {{ without its }}.
NotHere
A placeholder the place it is written in can’t name (a run-time value in a file).
Mode(String)
A file mode that isn’t octal digits up to 0777.
ServiceAndApp
A machine with both a catalogue service and a custom app.
WithWithoutService
A machine’s with without a service.
ConfigWithoutAppliance
An app’s config without an appliance.
ImageAndBuild
An app with both an image and a build.
ApplianceBuild
An appliance built from a Dockerfile.
FirmwareWithoutDynamips
firmware without appliance: cisco-dynamips.
NoRecipe
An app with no recipe at all.
DynamipsImage
cisco-dynamips with an image.
DynamipsFirmware
cisco-dynamips without its firmware.
ApplianceFirmware
Another appliance with a firmware.
ApplianceImage
An appliance without its image.
TestAndHttp
A healthcheck with both a test and an http page.
NoHealthProbe
A healthcheck that tries nothing.
NoFileSource
A file with no source.
FileSources(Vec<&'static str>)
A file with several sources.
EnvReference
An environment value written as a reference to neither one input nor one secret.
GpuCount(String)
A GPU count that is neither a whole number nor all.
GpusWord(String)
gpus as a word other than all.
Device(String)
A device written with more than three parts.
Layer
A layer of the defaults (the user’s or the project’s file, --images) that isn’t YAML.
Defaults
The defaults, merged, hold a key or a value they don’t have.
Fields
Images(Error)
An image table that isn’t one (--images, the defaults’ images:).
ProfileName(String)
A profile’s name that isn’t kebab-case.
NoProfile
No profile by that name.
Fields
TwoProfiles
Both profiles/<name>.yml and .yaml exist.
ProfileYaml
A profile’s file that isn’t YAML, or holds a field a profile doesn’t have.
Fields
ProfileMapping
A profile’s spec or defaults that isn’t a mapping.
ProfileInput
A profile’s input that isn’t one value.
ProfileMismatch
The profile names what the spec doesn’t have: one line per problem.
Fields
problems: Vec<ProfileProblem>The problems, one per field.
ProfileTarget
Another target than the one the profile runs on.
Fields
InstanceNumber(u8)
An instance number outside 1 to crate::instance::MAX.
InstanceName(String)
An environment’s name too long once it carries its instance.
Cidr(String)
Text that isn’t an IPv4 block.
Cidr6(String)
Text that isn’t an IPv6 /64 block.
InstancePort
A published port too high to shift for the instance.
InstanceIpv6
An IPv6 block too high to shift for the instance.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()