pub trait SkillProvider: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn skills(&self) -> Vec<SkillEntry>;
// Provided methods
fn precedence(&self) -> SkillPrecedence { ... }
fn body(&self, _name: &str) -> Option<String> { ... }
}Expand description
A place skills come from.
Required Methods§
Sourcefn id(&self) -> &str
fn id(&self) -> &str
Stable identifier, for logs and for a host that wants to find its own source again.
Sourcefn skills(&self) -> Vec<SkillEntry>
fn skills(&self) -> Vec<SkillEntry>
Everything this source has, as of now.
Provided Methods§
Sourcefn precedence(&self) -> SkillPrecedence
fn precedence(&self) -> SkillPrecedence
What this source does about a name another source already registered.
The engine’s own answer is that the disk wins: a project that writes
its own review skill means to override the built-in one.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".