pub enum ValidationErrorKind {
Show 20 variants
InvalidVersion {
found: String,
},
EmptyDeploymentName,
EmptyServiceName,
EmptyImageName,
InvalidPort {
port: u32,
},
InvalidCpu {
cpu: f64,
},
InvalidMemoryFormat {
value: String,
},
InvalidDuration {
value: String,
},
DuplicateEndpoint {
name: String,
},
UnknownInitAction {
action: String,
},
UnknownDependency {
service: String,
},
CircularDependency {
service: String,
depends_on: String,
},
InvalidScaleRange {
min: u32,
max: u32,
},
EmptyScaleTargets,
InvalidEnvVar {
key: String,
reason: String,
},
InvalidCronSchedule {
schedule: String,
reason: String,
},
ScheduleOnlyForCron,
CronRequiresSchedule,
Generic {
message: String,
},
InsufficientNodes {
required: usize,
available: usize,
message: String,
},
}Expand description
The specific kind of validation error
Variants§
InvalidVersion
Version is not “v1”
EmptyDeploymentName
Deployment name is empty
EmptyServiceName
Service name is empty
EmptyImageName
Image name is empty
InvalidPort
Port is out of valid range (1-65535)
InvalidCpu
CPU limit is invalid (must be > 0)
InvalidMemoryFormat
Memory format is invalid
InvalidDuration
Duration format is invalid
DuplicateEndpoint
Service has duplicate endpoints
UnknownInitAction
Unknown init action
UnknownDependency
Dependency references unknown service
CircularDependency
Circular dependency detected
InvalidScaleRange
Scale min > max
EmptyScaleTargets
Scale targets are empty in adaptive mode
InvalidEnvVar
Invalid environment variable
InvalidCronSchedule
Invalid cron schedule expression
ScheduleOnlyForCron
Schedule field is only valid for rtype: cron
CronRequiresSchedule
rtype: cron requires a schedule field
Generic
Generic validation error (from validator crate)
InsufficientNodes
Not enough nodes available for dedicated/exclusive placement
Trait Implementations§
Source§impl Clone for ValidationErrorKind
impl Clone for ValidationErrorKind
Source§fn clone(&self) -> ValidationErrorKind
fn clone(&self) -> ValidationErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorKind
impl Debug for ValidationErrorKind
Source§impl<'de> Deserialize<'de> for ValidationErrorKind
impl<'de> Deserialize<'de> for ValidationErrorKind
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ValidationErrorKind
impl Display for ValidationErrorKind
Source§impl PartialEq for ValidationErrorKind
impl PartialEq for ValidationErrorKind
Source§impl Serialize for ValidationErrorKind
impl Serialize for ValidationErrorKind
impl StructuralPartialEq for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP