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§
Sourcefn capabilities(&self) -> &BackendCapabilities
fn capabilities(&self) -> &BackendCapabilities
Get backend capabilities
Sourcefn is_available() -> boolwhere
Self: Sized,
fn is_available() -> boolwhere
Self: Sized,
Check if this backend is available on the current system
Sourcefn initialize() -> Result<Self>where
Self: Sized,
fn initialize() -> Result<Self>where
Self: Sized,
Initialize the backend
Provided Methods§
Sourcefn backend_type(&self) -> BackendType
fn backend_type(&self) -> BackendType
Get backend type