Skip to main content

ModelError

Enum ModelError 

Source
#[non_exhaustive]
pub enum ModelError {
Show 19 variants EmptyValue(&'static str), ContainsNul(&'static str), ReversedSpan { start: usize, end: usize, }, DuplicateResource { kind: &'static str, name: String, }, DuplicateServiceGroupMember { group: String, service: String, }, UnknownServiceGroupMember { group: String, service: String, }, ServiceInMultipleGroups { service: String, existing: String, replacement: String, }, UnknownImageAcquisitionReference { service: String, acquisition: String, }, UnknownImageBuildReference { service: String, build: String, }, UnknownVolumeImageAcquisitionReference { volume: String, acquisition: String, }, UnknownVolumeImageBuildReference { volume: String, build: String, }, UnknownArtifactDependencyNode { kind: &'static str, name: String, }, ImageArtifactDependencyCycle { nodes: Vec<String>, }, InvalidImageReference(&'static str), ZeroContainerPort, UnknownNetworkAttachmentIndex { index: usize, len: usize, }, UnknownServiceGroupRuntimeNetworkIndex { index: usize, len: usize, }, RootfsImageSourceConflict { service: String, source: &'static str, }, InvalidHealthcheckRetries,
}
Expand description

Error raised when constructing an invalid neutral model value.

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.
§

EmptyValue(&'static str)

A required value was empty.

§

ContainsNul(&'static str)

A value contained a NUL byte.

§

ReversedSpan

A source byte range ended before it started.

Fields

§start: usize

Inclusive start offset.

§end: usize

Exclusive end offset.

§

DuplicateResource

An application already contains a resource of this kind and name.

Fields

§kind: &'static str

Neutral resource kind.

§name: String

Duplicated name.

§

DuplicateServiceGroupMember

A service was added to the same group more than once.

Fields

§group: String

Service-group name.

§service: String

Duplicate service name.

§

UnknownServiceGroupMember

A service group referenced a service absent from the application.

Fields

§group: String

Service-group name.

§service: String

Missing service name.

§

ServiceInMultipleGroups

A service was assigned to more than one application group.

Fields

§service: String

Service name.

§existing: String

Existing service-group name.

§replacement: String

Conflicting service-group name.

§

UnknownImageAcquisitionReference

A service referenced an image acquisition absent from the application.

Fields

§service: String

Referencing service name.

§acquisition: String

Missing image-acquisition resource name.

§

UnknownImageBuildReference

A service referenced an image build absent from the application.

Fields

§service: String

Referencing service name.

§build: String

Missing image-build resource name.

§

UnknownVolumeImageAcquisitionReference

A volume referenced an image-acquisition resource absent from the application.

Fields

§volume: String

Referencing volume name.

§acquisition: String

Missing image-acquisition resource name.

§

UnknownVolumeImageBuildReference

A volume referenced an image-build resource absent from the application.

Fields

§volume: String

Referencing volume name.

§build: String

Missing image-build resource name.

§

UnknownArtifactDependencyNode

An explicitly supplied artifact dependency referred to a resource absent from the application.

Fields

§kind: &'static str

Missing resource kind.

§name: String

Missing resource name.

§

ImageArtifactDependencyCycle

Explicit artifact dependencies formed a cycle.

Fields

§nodes: Vec<String>

Stable, resource-qualified members of one detected cycle.

§

InvalidImageReference(&'static str)

An image reference had invalid component structure.

§

ZeroContainerPort

A container port was zero.

§

UnknownNetworkAttachmentIndex

A requested service network-attachment index did not exist.

Fields

§index: usize

Requested attachment index.

§len: usize

Number of attachments present when replacement was attempted.

§

UnknownServiceGroupRuntimeNetworkIndex

A requested group-runtime network-attachment index did not exist.

Fields

§index: usize

Requested attachment index.

§len: usize

Number of attachments present when replacement was attempted.

§

RootfsImageSourceConflict

A service combined a root filesystem with an image source.

Fields

§service: String

Referencing service name.

§source: &'static str

Conflicting image source kind.

§

InvalidHealthcheckRetries

A health-check retry count was not a non-negative decimal integer.

Trait Implementations§

Source§

impl Clone for ModelError

Source§

fn clone(&self) -> ModelError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModelError

Source§

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

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

impl Display for ModelError

Source§

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

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

impl Eq for ModelError

Source§

impl Error for ModelError

1.30.0 · 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 PartialEq for ModelError

Source§

fn eq(&self, other: &ModelError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ModelError

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.