Skip to main content

BackendSupport

Trait BackendSupport 

Source
pub trait BackendSupport {
    // Required methods
    fn family(&self) -> &'static str;
    fn supports(&self, device: Device) -> bool;
}
Expand description

Per-family backend support filter.

Each model family declares which devices it can execute on (e.g., SAM adds TPU on top of the standard set; some VLM crates exclude MLX until the vision tower lands). A single shared BackendSupport impl per family lets validate_device return uniform error messages instead of every model crate hand-rolling the same match ladder.

Required Methods§

Source

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

Short stable family identifier ("qwen3", "llama32", "sam").

Source

fn supports(&self, device: Device) -> bool

true if this family can execute on device today.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§