use crate::capnp::machine::Machine; use crate::resources::search::ResourcesHandle; use crate::resources::Resource; use crate::session::SessionHandle; use crate::RESOURCES; use api::resources_capnp::resources; use capnp::capability::Promise; use capnp_rpc::pry; use tracing::Span; const TARGET: &str = "bffh::api::machinesystem"; #[derive(Clone)] pub struct Machines { span: Span, session: SessionHandle, resources: ResourcesHandle, } impl Machines { pub fn new(session: SessionHandle) -> Self { let span = tracing::info_span!( target: TARGET, parent: &session.span, "MachineSystem", ); // FIXME no unwrap bad Self { span, session, resources: RESOURCES.get().unwrap().clone(), } } } impl resources::Server for Machines { }