use crate::authorization::permissions::Permission; use api::main_capnp::session::Owned as CPSession; use api::auth_capnp::response::successful::Builder; use crate::capnp::resources::Machines; use crate::session::SessionHandle; #[derive(Debug, Clone)] pub struct APISession; impl APISession { pub fn new() -> Self { Self } pub fn build(session: SessionHandle, builder: Builder) { let mut builder = builder.init_session(); builder.set_resources(capnp_rpc::new_client(Machines::new(session))) } }