mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 23:27:57 +01:00
30 lines
740 B
Rust
30 lines
740 B
Rust
use crate::capnp::user::User;
|
|
use crate::resources::modules::fabaccess::{ArchivedStatus, Status};
|
|
use crate::resources::Resource;
|
|
use crate::session::SessionHandle;
|
|
use api::resource_capnp::resource;
|
|
use api::claim_capnp::claimable;
|
|
use capnp::capability::Promise;
|
|
use capnp_rpc::pry;
|
|
|
|
#[derive(Clone)]
|
|
pub struct Machine {
|
|
session: SessionHandle,
|
|
resource: Resource,
|
|
}
|
|
|
|
impl Machine {
|
|
pub fn new(session: SessionHandle, resource: Resource) -> Self {
|
|
Self { session, resource }
|
|
}
|
|
pub fn fill_resource(self, builder: &mut resource::Builder) {
|
|
builder.set_identifier(self.resource.get_id());
|
|
builder.set_claim(capnp_rpc::new_client(self.clone()));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
impl claimable::Server for Machine {
|
|
|
|
} |