pub enum ServiceError {
DuplicateSlot {
slot: Name,
first: FeatureName,
second: FeatureName,
},
UndeclaredSlot {
feature: FeatureName,
target: SlotTarget,
roster: Vec<Name>,
},
AmbiguousSlot {
feature: FeatureName,
ty: TypeKey,
slots: Vec<Name>,
},
TypeMismatch {
feature: FeatureName,
slot: Name,
declared: TypeKey,
contributed: TypeKey,
},
SingleSlotRefilled {
slot: Name,
first: FeatureName,
second: FeatureName,
},
RequiredSlotUnfilled {
slot: Name,
required_by: FeatureName,
},
}Expand description
A problem that makes assemble refuse the service slot declarations,
contributions and requirements of a registry.
The registry build reports each one as a build error
(BuildError::Service).
Every variant identifies the features involved, so that the report says
which feature to correct.
Variants§
DuplicateSlot
Two features declared a service slot under one name. A slot name identifies one interaction, owned by one feature.
Fields
first: FeatureNameThe feature that declared it first.
second: FeatureNameThe feature that declared it again.
UndeclaredSlot
A contribution or a requirement refers to a service slot that no feature declares.
Fields
feature: FeatureNameThe feature that contributed or required.
target: SlotTargetThe service slot it refers to.
AmbiguousSlot
A contribution or a requirement identifies its service slot by type alone, and several slots have that type. Giving the slot’s name removes the ambiguity.
Fields
feature: FeatureNameThe feature that contributed or required.
TypeMismatch
A value was contributed as a type other than the one its service slot declares.
Fields
feature: FeatureNameThe contributing feature.
SingleSlotRefilled
A second value was contributed to a service slot that takes exactly
one (Arity::Single).
Fields
first: FeatureNameThe feature whose value fills it.
second: FeatureNameThe feature that contributed a second value.
RequiredSlotUnfilled
A service slot that a feature requires
(ServiceRequirement) received no value.
Trait Implementations§
Source§impl Clone for ServiceError
impl Clone for ServiceError
Source§impl Debug for ServiceError
impl Debug for ServiceError
Source§impl Display for ServiceError
impl Display for ServiceError
impl Eq for ServiceError
Source§impl Error for ServiceError
impl Error for ServiceError
1.30.0 · 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()
Source§impl From<ServiceError> for BuildError
impl From<ServiceError> for BuildError
Source§fn from(error: ServiceError) -> BuildError
fn from(error: ServiceError) -> BuildError
Source§impl PartialEq for ServiceError
impl PartialEq for ServiceError
impl StructuralPartialEq for ServiceError
Auto Trait Implementations§
impl Forget for ServiceError
impl Freeze for ServiceError
impl Move for ServiceError
impl RefUnwindSafe for ServiceError
impl Send for ServiceError
impl Sync for ServiceError
impl Unpin for ServiceError
impl UnsafeUnpin for ServiceError
impl UnwindSafe for ServiceError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more