pub struct BackendRegistry { /* private fields */ }Expand description
Process-wide registry of compiled-in backends. Backends register themselves
from their crate’s init() (called from ironaccelerator::init).
Implementations§
Source§impl BackendRegistry
impl BackendRegistry
pub fn new() -> Self
pub fn register(&mut self, backend: &'static dyn Backend)
pub fn get(&self, kind: BackendKind) -> Option<&'static dyn Backend>
pub fn iter(&self) -> impl Iterator<Item = &'static dyn Backend> + '_
pub fn available(&self) -> impl Iterator<Item = &'static dyn Backend> + '_
Sourcepub fn describe_all(&self) -> Vec<DeviceDescriptor>
pub fn describe_all(&self) -> Vec<DeviceDescriptor>
Enumerate every device across every available backend. Errors from any one backend are swallowed (we return an empty list for it) so a single broken backend can’t mask the rest — callers that want error visibility should iterate manually.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BackendRegistry
impl !UnwindSafe for BackendRegistry
impl Freeze for BackendRegistry
impl Send for BackendRegistry
impl Sync for BackendRegistry
impl Unpin for BackendRegistry
impl UnsafeUnpin for BackendRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more