Skip to main content

Declared

Trait Declared 

Source
pub trait Declared:
    Copy
    + Eq
    + 'static {
    type Caps;

    const FALLBACK_CODE: ErrorCode;
    const REFUSED_CODE: ErrorCode;

    // Required methods
    fn name(self) -> &'static str;
    fn lacks(self, caps: &Self::Caps) -> Option<String>;
    fn fallback(self) -> Option<Self>;
}
Expand description

A setting value with a declared fallback chain.

Required Associated Constants§

Source

const FALLBACK_CODE: ErrorCode

The code of the warning a fallback emits: (requested, why, running).

Source

const REFUSED_CODE: ErrorCode

The code of the refusal a strict setting emits: (requested, why).

Required Associated Types§

Source

type Caps

What the host offers, probed once by the host (never by the core).

Required Methods§

Source

fn name(self) -> &'static str

The value’s spelling.

Source

fn lacks(self, caps: &Self::Caps) -> Option<String>

Why self cannot run on caps, or None when it can.

Source

fn fallback(self) -> Option<Self>

The declared fallback of self (None: the end of the chain, which must run anywhere).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Declared for ExecutorKind

Source§

const FALLBACK_CODE: ErrorCode = ErrorCode::ExecutorFallback

Source§

const REFUSED_CODE: ErrorCode = ErrorCode::ExecutorRefused

Source§

type Caps = ExecutorCaps