pub trait ToBackend<B: Backend>: Sized {
type OnBackend;
// Required method
fn to_backend_device(self, device: &B::Device) -> Self::OnBackend;
// Provided method
fn to_backend(self) -> Self::OnBackend { ... }
}Expand description
trait for switching the backend of a module
Required Associated Types§
Required Methods§
Sourcefn to_backend_device(self, device: &B::Device) -> Self::OnBackend
fn to_backend_device(self, device: &B::Device) -> Self::OnBackend
moves the module to the backend with the device
Provided Methods§
Sourcefn to_backend(self) -> Self::OnBackend
fn to_backend(self) -> Self::OnBackend
moves the module to the backend with the device
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.