#[non_exhaustive]pub enum CapabilityRefusal {
SymbolUnavailable(&'static CStr),
BuildAbiUnavailable(&'static CStr),
WrongEdition(Option<&'static CStr>),
RuntimeTooOld {
required: &'static SdkVersion,
},
RuntimeVersionUnknown {
required: &'static SdkVersion,
},
}Expand description
The evidence that prevents a capability from being used.
Detection records this value once. Capability queries and operation errors carry that same value, including when another capability requires it. Required versions borrow immutable registry values so this evidence stays small and allocation-free on both 32-bit and 64-bit targets.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
The selected library does not export this required entry point.
This build’s SDK declarations do not contain this entry point or constant.
WrongEdition(Option<&'static CStr>)
The runtime is not Advanced, optionally naming an entry point it lacks.
RuntimeTooOld
The runtime predates the required semantic version.
Fields
required: &'static SdkVersionThe first version that may safely implement this capability.
RuntimeVersionUnknown
The runtime version cannot establish the required semantics.
Fields
required: &'static SdkVersionThe first version that may safely implement this capability.
Implementations§
Source§impl CapabilityRefusal
impl CapabilityRefusal
Sourcepub const fn reason(self) -> CapabilityUnavailable
pub const fn reason(self) -> CapabilityUnavailable
The category of this refusal, without discarding its typed evidence.
Trait Implementations§
Source§impl Clone for CapabilityRefusal
impl Clone for CapabilityRefusal
impl Copy for CapabilityRefusal
Source§impl Debug for CapabilityRefusal
impl Debug for CapabilityRefusal
Source§impl Display for CapabilityRefusal
impl Display for CapabilityRefusal
impl Eq for CapabilityRefusal
Source§impl Error for CapabilityRefusal
impl Error for CapabilityRefusal
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()