Skip to main content

Error

Enum Error 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

Fields

§path: PathBuf

The file.

§source: Error

The system’s reason.

§

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

§file: String

The spec file the problems are placed in (isoloom.yml).

§problems: Vec<Problem>

The problems.

§

SetShape

A -s that isn’t key=value.

Fields

§set: String

The -s as given.

§

SetKey

A -s whose key isn’t a dotted path.

Fields

§set: String

The -s as given.

§

Name

A name that breaks its rule.

Fields

§what: &'static str

What it names (port name).

§value: String

The value written.

§rule: &'static str

The rule, as an author fixes the value.

§

UnknownOs

An OS no family names.

Fields

§text: String

What the spec wrote.

§known: String

The families and their versions.

§

UnknownOsVersion

A known OS family without that version.

Fields

§family: &'static str

The family.

§version: String

The version the spec wrote.

§known: String

The family’s versions.

§default: &'static str

The family’s default version.

§

Placeholder

A {{ path }} placeholder whose path the grammar doesn’t have.

Fields

§path: String

The path as written, trimmed.

§why: &'static str

What the paths there are.

§

Unclosed

A {{ without its }}.

§

NotHere

A placeholder the place it is written in can’t name (a run-time value in a file).

Fields

§reference: Reference

What it names.

§why: &'static str

Why the place can’t name it.

§

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.

Fields

§path: PathBuf

The file.

§source: Error

What the YAML reader reported.

§

Defaults

The defaults, merged, hold a key or a value they don’t have.

Fields

§sources: String

The layers merged, as isoloom defaults names them.

§source: Error

What the typed read reported.

§

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

§name: String

The name asked for.

§folder: PathBuf

The project’s profiles folder.

§known: Vec<String>

The profiles it has, by name.

§

TwoProfiles

Both profiles/<name>.yml and .yaml exist.

Fields

§name: String

The profile’s name.

§

ProfileYaml

A profile’s file that isn’t YAML, or holds a field a profile doesn’t have.

Fields

§name: String

The profile’s name.

§path: PathBuf

Its file.

§source: Error

What the YAML reader reported.

§

ProfileMapping

A profile’s spec or defaults that isn’t a mapping.

Fields

§name: String

The profile’s name.

§path: PathBuf

Its file.

§key: &'static str

The field.

§

ProfileInput

A profile’s input that isn’t one value.

Fields

§name: String

The profile’s name.

§path: PathBuf

Its file.

§input: String

The input.

§

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

§profile: String

The profile’s name.

§target: Target

The target it runs on.

§asked: String

The target asked for.

§

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.

Fields

§machine: String

The machine.

§port: u16

The published port.

§instance: u8

The instance.

§

InstanceIpv6

An IPv6 block too high to shift for the instance.

Fields

§network: String

The network.

§cidr: String

Its IPv6 block.

§instance: u8

The instance.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.