vyre_driver/backend/
capability.rs1use super::VyreBackend;
4use std::collections::HashSet;
5use vyre_foundation::ir::OpId;
6
7pub trait Backend: Send + Sync {
9 fn id(&self) -> &'static str;
11 fn version(&self) -> &'static str;
13 fn supported_ops(&self) -> &HashSet<OpId>;
15}
16
17impl<T: VyreBackend + ?Sized> Backend for T {
18 fn id(&self) -> &'static str {
19 VyreBackend::id(self)
20 }
21
22 fn version(&self) -> &'static str {
23 VyreBackend::version(self)
24 }
25
26 fn supported_ops(&self) -> &HashSet<OpId> {
27 VyreBackend::supported_ops(self)
28 }
29}