Skip to main content

Backend

Trait Backend 

Source
pub trait Backend {
    // Required methods
    fn capabilities(&self) -> &BackendCapabilities;
    fn is_available() -> bool
       where Self: Sized;
    fn initialize() -> Result<Self>
       where Self: Sized;

    // Provided method
    fn backend_type(&self) -> BackendType { ... }
}
Expand description

Backend trait for different compute backends

Required Methods§

Source

fn capabilities(&self) -> &BackendCapabilities

Get backend capabilities

Source

fn is_available() -> bool
where Self: Sized,

Check if this backend is available on the current system

Source

fn initialize() -> Result<Self>
where Self: Sized,

Initialize the backend

Provided Methods§

Source

fn backend_type(&self) -> BackendType

Get backend type

Implementors§