pub enum Error {
Show 29 variants
MissingField(DeclField),
EmptyField(DeclField),
ExtraneousField(DeclField),
DuplicateField(DeclField, String),
InvalidField(DeclField),
InvalidUrl(DeclField, String),
FieldTooLong(DeclField),
FieldInvalidSegment(DeclField),
CapabilityMustBeBuiltin(DeclType),
CapabilityCannotBeBuiltin(DeclType),
UnknownCapability,
InvalidChild(DeclField, String),
InvalidCollection(DeclField, String),
InvalidStorage(DeclField, String),
InvalidEnvironment(DeclField, String),
InvalidCapability(DeclField, String),
InvalidRunner(DeclField, String),
DependencyCycle(String),
InvalidPathOverlap {
decl: DeclField,
path: String,
other_decl: DeclField,
other_path: String,
},
PkgPathOverlap {
decl: DeclField,
path: String,
},
ExtraneousSourcePath(DeclField, String),
NestedVector,
AvailabilityMustBeOptional(DeclField, String),
InvalidAggregateOffer(String),
DifferentAvailabilityInAggregation(AvailabilityList),
MultipleRunnersUsed,
ConflictingRunners,
MissingRunner,
DynamicChildWithEnvironment,
}
Expand description
Enum type that can represent any error encountered during validation.
Variants§
MissingField(DeclField)
EmptyField(DeclField)
ExtraneousField(DeclField)
DuplicateField(DeclField, String)
InvalidField(DeclField)
InvalidUrl(DeclField, String)
FieldTooLong(DeclField)
FieldInvalidSegment(DeclField)
CapabilityMustBeBuiltin(DeclType)
CapabilityCannotBeBuiltin(DeclType)
UnknownCapability
InvalidChild(DeclField, String)
InvalidCollection(DeclField, String)
InvalidStorage(DeclField, String)
InvalidEnvironment(DeclField, String)
InvalidCapability(DeclField, String)
InvalidRunner(DeclField, String)
DependencyCycle(String)
InvalidPathOverlap
PkgPathOverlap
ExtraneousSourcePath(DeclField, String)
NestedVector
AvailabilityMustBeOptional(DeclField, String)
InvalidAggregateOffer(String)
DifferentAvailabilityInAggregation(AvailabilityList)
MultipleRunnersUsed
ConflictingRunners
MissingRunner
DynamicChildWithEnvironment
Implementations§
Source§impl Error
impl Error
pub fn missing_field(decl_type: DeclType, keyword: impl Into<String>) -> Self
pub fn empty_field(decl_type: DeclType, keyword: impl Into<String>) -> Self
pub fn extraneous_field(decl_type: DeclType, keyword: impl Into<String>) -> Self
pub fn duplicate_field( decl_type: DeclType, keyword: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn invalid_field(decl_type: DeclType, keyword: impl Into<String>) -> Self
pub fn invalid_url( decl_type: DeclType, keyword: impl Into<String>, message: impl Into<String>, ) -> Self
pub fn field_too_long(decl_type: DeclType, keyword: impl Into<String>) -> Self
pub fn field_invalid_segment( decl_type: DeclType, keyword: impl Into<String>, ) -> Self
pub fn invalid_child( decl_type: DeclType, keyword: impl Into<String>, child: impl Into<String>, ) -> Self
pub fn invalid_collection( decl_type: DeclType, keyword: impl Into<String>, collection: impl Into<String>, ) -> Self
pub fn invalid_environment( decl_type: DeclType, keyword: impl Into<String>, environment: impl Into<String>, ) -> Self
pub fn invalid_runner( decl_type: DeclType, keyword: impl Into<String>, runner: impl Into<String>, ) -> Self
pub fn invalid_capability( decl_type: DeclType, keyword: impl Into<String>, capability: impl Into<String>, ) -> Self
pub fn dependency_cycle(error: String) -> Self
pub fn invalid_path_overlap( decl: DeclType, path: impl Into<String>, other_decl: DeclType, other_path: impl Into<String>, ) -> Self
pub fn pkg_path_overlap(decl: DeclType, path: impl Into<String>) -> Self
pub fn extraneous_source_path( decl_type: DeclType, path: impl Into<String>, ) -> Self
pub fn nested_vector() -> Self
pub fn availability_must_be_optional( decl_type: DeclType, keyword: impl Into<String>, source_name: Option<&String>, ) -> Self
pub fn invalid_aggregate_offer(info: impl Into<String>) -> Self
pub fn different_availability_in_aggregation( availability: Vec<Availability>, ) -> Self
pub fn from_parse_error( err: ParseError, prop: &String, decl_type: DeclType, keyword: &str, ) -> Self
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)