Skip to main content

LevelTag

Trait LevelTag 

Source
pub trait LevelTag:
    'static
    + Send
    + Sync
    + Debug {
    // Required method
    fn rank(&self) -> u32;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

Discovery-tier abstraction symmetric with CategoryTag.

veks-completion doesn’t define how many tiers exist or how they’re named — each consuming crate decides. Implement LevelTag on your own enum to declare a closed set of stratified-completion tiers; commands then return &'static dyn LevelTag and the completion engine orders by [rank].

rank() is the scalar used by stratified completion (the Nth tab tap reveals everything with rank <= N). Lower = more discoverable. Two implementors with the same rank are treated as the same tier.

Required Methods§

Source

fn rank(&self) -> u32

Numeric tier; lower values are revealed first by the stratified-completion tab cycle.

Provided Methods§

Source

fn name(&self) -> &'static str

Optional display name (e.g., “primary”, “advanced”) for help renderers. Default returns the empty string — implementors should override for human-friendly listings.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§