pub enum VersionError {
Semver(String, String),
Requirement(String, String),
}Variants§
Implementations§
Source§impl VersionError
impl VersionError
Sourcepub fn semver(value: impl Into<String>, reason: impl Into<String>) -> Self
pub fn semver(value: impl Into<String>, reason: impl Into<String>) -> Self
Construct a VersionError::Semver carrying the offending
authoring string value and the underlying semver::Version::parse
reason verbatim in the variant’s two-slot tuple-newtype payload.
Folds the uniform Self::Semver(value.into(), reason.into())
tuple-newtype construction onto one substrate primitive so every
wire-up on the variant reads through one dispatch rather than the
pre-lift open-coded
VersionError::Semver(<into-String-expr>, <into-String-expr>)
block. The paired impl Into<String> bounds cover the pre-lift
String wire-up shape on CaixaVersion::parse
(self.0.clone() on the parser-scoped String field, e.to_string()
on the derived String from the failing
semver::Version::parse arm) without forcing the caller to
spell the conversion at the wire-up site. Peer to the sibling
VersionError::Requirement variant on the parse_requirement
surface — the same (String, String) two-slot tuple-newtype axis
of the paired VersionError envelope, but on the SemVer
version-body parser surface rather than the version-requirement
parser surface.
Sourcepub fn requirement(value: impl Into<String>, reason: impl Into<String>) -> Self
pub fn requirement(value: impl Into<String>, reason: impl Into<String>) -> Self
Construct a VersionError::Requirement carrying the offending
authoring string value and the underlying
semver::VersionReq::parse reason verbatim in the variant’s
two-slot tuple-newtype payload. Folds the uniform
Self::Requirement(value.into(), reason.into()) tuple-newtype
construction onto one substrate primitive so every wire-up on the
variant reads through one dispatch rather than the pre-lift open-
coded VersionError::Requirement(<into-String-expr>, <into-String-expr>) block. Peer to the sibling
VersionError::semver ctor on the CaixaVersion::parse
surface — the same (String, String) two-slot tuple-newtype axis
of the paired VersionError envelope, but on the version-
requirement parser surface rather than the semver-version-body
parser surface. Closes the last un-lifted variant on the
VersionError envelope: every arm now reaches its emit site
through one substrate-primitive dispatch, matching the “one
substrate primitive per emit-site variant” ratchet the peer per-
variant lifts on crate::AplicacaoError /
crate::SupervisorError / crate::UpgradeError /
crate::LayoutError / crate::DepError /
crate::ManifestError / crate::LimitsError /
crate::BehaviorError / crate::DialetoError have converged
onto.
Trait Implementations§
Source§impl Debug for VersionError
impl Debug for VersionError
Source§impl Display for VersionError
impl Display for VersionError
impl Eq for VersionError
Source§impl Error for VersionError
impl Error for VersionError
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 PartialEq for VersionError
impl PartialEq for VersionError
impl StructuralPartialEq for VersionError
Auto Trait Implementations§
impl Freeze for VersionError
impl RefUnwindSafe for VersionError
impl Send for VersionError
impl Sync for VersionError
impl Unpin for VersionError
impl UnsafeUnpin for VersionError
impl UnwindSafe for VersionError
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.