fabaccess-bffh/bffhd/capnp/machinesystem.rs
2022-11-04 17:25:17 +01:00

39 lines
859 B
Rust

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 {
}