mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 06:47:56 +01:00
Move API back to v0.3
This commit is contained in:
parent
520a33f0aa
commit
487dc2270d
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "api"
|
||||
version = "0.1.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
|
@ -5,60 +5,4 @@
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub mod schema;
|
||||
|
||||
/// Authentication subsystem
|
||||
pub mod auth {
|
||||
/// Session authentication
|
||||
///
|
||||
/// Authentication uses a SASL exchange. To bootstrap a connection you will need to call
|
||||
/// `step` until you get a successful result
|
||||
pub mod authentication {
|
||||
pub use crate::schema::auth_capnp::authentication::*;
|
||||
}
|
||||
|
||||
pub mod response {
|
||||
pub use crate::schema::auth_capnp::response::*;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod resource {
|
||||
pub use crate::schema::resource_capnp::*;
|
||||
}
|
||||
|
||||
pub mod resources {
|
||||
pub use crate::schema::resources_capnp::*;
|
||||
}
|
||||
|
||||
pub mod role {
|
||||
pub use crate::schema::role_capnp::*;
|
||||
}
|
||||
|
||||
pub mod user {
|
||||
pub use crate::schema::user_capnp::user::*;
|
||||
}
|
||||
|
||||
pub mod users {
|
||||
pub use crate::schema::users_capnp::users::*;
|
||||
}
|
||||
|
||||
pub mod utils {
|
||||
pub mod uuid {
|
||||
pub use crate::schema::utils_capnp::u_u_i_d::*;
|
||||
}
|
||||
|
||||
/// Localization String
|
||||
///
|
||||
/// This is a specialized string that allows to access the string contents in different
|
||||
/// languages
|
||||
pub mod l10n_string {
|
||||
pub use crate::schema::utils_capnp::l10_n_string::*;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod bootstrap {
|
||||
pub use crate::schema::main_capnp::bootstrap::*;
|
||||
}
|
||||
|
||||
pub mod session {
|
||||
pub use crate::schema::main_capnp::session::*;
|
||||
}
|
||||
pub use schema::*;
|
||||
|
@ -1,57 +1,72 @@
|
||||
pub use capnpc::schema_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod auth_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/auth_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod auth_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod main_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/main_capnp.rs"));
|
||||
pub mod authenticationsystem_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/authenticationsystem_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod main_capnp;
|
||||
pub mod authenticationsystem_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod utils_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/utils_capnp.rs"));
|
||||
pub mod connection_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/connection_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod utils_capnp;
|
||||
pub mod connection_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod resource_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/resource_capnp.rs"));
|
||||
pub mod general_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/general_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod resource_capnp;
|
||||
pub mod general_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod resources_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/resources_capnp.rs"));
|
||||
pub mod machine_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/machine_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod resources_capnp;
|
||||
pub mod machine_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod machinesystem_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/machinesystem_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod machinesystem_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod permissionsystem_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/permissionsystem_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod permissionsystem_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod role_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/role_capnp.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/role_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod role_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod space_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/space_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod space_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod user_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/user_capnp.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/user_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod user_capnp;
|
||||
|
||||
#[cfg(feature = "generated")]
|
||||
pub mod users_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/users_capnp.rs"));
|
||||
pub mod usersystem_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/schema/usersystem_capnp.rs"));
|
||||
}
|
||||
#[cfg(not(feature = "generated"))]
|
||||
pub mod users_capnp;
|
||||
pub mod usersystem_capnp;
|
||||
|
File diff suppressed because it is too large
Load Diff
2333
api/src/schema/authenticationsystem_capnp.rs
Normal file
2333
api/src/schema/authenticationsystem_capnp.rs
Normal file
File diff suppressed because it is too large
Load Diff
1768
api/src/schema/connection_capnp.rs
Normal file
1768
api/src/schema/connection_capnp.rs
Normal file
File diff suppressed because it is too large
Load Diff
298
api/src/schema/general_capnp.rs
Normal file
298
api/src/schema/general_capnp.rs
Normal file
@ -0,0 +1,298 @@
|
||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
||||
// DO NOT EDIT.
|
||||
// source: general.capnp
|
||||
|
||||
|
||||
pub mod u_u_i_d {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_uuid0(self) -> u64 {
|
||||
self.reader.get_data_field::<u64>(0)
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_uuid1(self) -> u64 {
|
||||
self.reader.get_data_field::<u64>(1)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_uuid0(self) -> u64 {
|
||||
self.builder.get_data_field::<u64>(0)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_uuid0(&mut self, value: u64) {
|
||||
self.builder.set_data_field::<u64>(0, value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_uuid1(self) -> u64 {
|
||||
self.builder.get_data_field::<u64>(1)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_uuid1(&mut self, value: u64) {
|
||||
self.builder.set_data_field::<u64>(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 2, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0xb01b_03d4_f827_7597;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod key_value_pair {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_key(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_key(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_value(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_value(&self) -> bool {
|
||||
!self.reader.get_pointer_field(1).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_key(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_key(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_key(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_text(size)
|
||||
}
|
||||
pub fn has_key(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_value(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_value(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(1).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_value(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(1).init_text(size)
|
||||
}
|
||||
pub fn has_value(&self) -> bool {
|
||||
!self.builder.get_pointer_field(1).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 2 };
|
||||
pub const TYPE_ID: u64 = 0xfb54_3b21_ce63_7bf1;
|
||||
}
|
||||
}
|
7272
api/src/schema/machine_capnp.rs
Normal file
7272
api/src/schema/machine_capnp.rs
Normal file
File diff suppressed because it is too large
Load Diff
1261
api/src/schema/machinesystem_capnp.rs
Normal file
1261
api/src/schema/machinesystem_capnp.rs
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,757 +0,0 @@
|
||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
||||
// DO NOT EDIT.
|
||||
// source: main.capnp
|
||||
|
||||
|
||||
|
||||
pub mod bootstrap {
|
||||
#![allow(unused_variables)]
|
||||
pub type MechanismsParams<> = ::capnp::capability::Params<crate::schema::main_capnp::bootstrap::mechanisms_params::Owned>;
|
||||
pub type MechanismsResults<> = ::capnp::capability::Results<crate::schema::main_capnp::bootstrap::mechanisms_results::Owned>;
|
||||
pub type CreateSessionParams<> = ::capnp::capability::Params<crate::schema::main_capnp::bootstrap::create_session_params::Owned>;
|
||||
pub type CreateSessionResults<> = ::capnp::capability::Results<crate::schema::main_capnp::bootstrap::create_session_results::Owned>;
|
||||
|
||||
pub struct Client {
|
||||
pub client: ::capnp::capability::Client,
|
||||
}
|
||||
impl ::capnp::capability::FromClientHook for Client {
|
||||
fn new(hook: Box<dyn (::capnp::private::capability::ClientHook)>) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(hook), }
|
||||
}
|
||||
}
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Client; type Builder = Client; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Client; }
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Client<> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(reader.get_capability()?))
|
||||
}
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Client<> {
|
||||
fn init_pointer(_builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Client<> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(builder.get_capability()?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <> ::capnp::traits::SetPointerBuilder for Client<> {
|
||||
fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Client<>, _canonicalize: bool) -> ::capnp::Result<()> {
|
||||
pointer.set_capability(from.client.hook);
|
||||
::core::result::Result::Ok(())
|
||||
}
|
||||
}
|
||||
impl ::capnp::traits::HasTypeId for Client {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl Clone for Client {
|
||||
fn clone(&self) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(self.client.hook.add_ref()), }
|
||||
}
|
||||
}
|
||||
impl Client {
|
||||
pub fn mechanisms_request(&self) -> ::capnp::capability::Request<crate::schema::main_capnp::bootstrap::mechanisms_params::Owned,crate::schema::main_capnp::bootstrap::mechanisms_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
||||
}
|
||||
pub fn create_session_request(&self) -> ::capnp::capability::Request<crate::schema::main_capnp::bootstrap::create_session_params::Owned,crate::schema::main_capnp::bootstrap::create_session_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
||||
}
|
||||
}
|
||||
pub trait Server<> {
|
||||
fn mechanisms(&mut self, _: MechanismsParams<>, _: MechanismsResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn create_session(&mut self, _: CreateSessionParams<>, _: CreateSessionResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
}
|
||||
pub struct ServerDispatch<_T,> {
|
||||
pub server: _T,
|
||||
}
|
||||
impl <_S: Server + 'static, > ::capnp::capability::FromServer<_S> for Client {
|
||||
type Dispatch = ServerDispatch<_S, >;
|
||||
fn from_server(s: _S) -> ServerDispatch<_S, > {
|
||||
ServerDispatch { server: s, }
|
||||
}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::Deref for ServerDispatch<_T> {
|
||||
type Target = _T;
|
||||
fn deref(&self) -> &_T { &self.server}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::DerefMut for ServerDispatch<_T> {
|
||||
fn deref_mut(&mut self) -> &mut _T { &mut self.server}
|
||||
}
|
||||
impl <_T: Server> ::capnp::capability::Server for ServerDispatch<_T> {
|
||||
fn dispatch_call(&mut self, interface_id: u64, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match interface_id {
|
||||
_private::TYPE_ID => ServerDispatch::<_T, >::dispatch_call_internal(&mut self.server, method_id, params, results),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
impl <_T :Server> ServerDispatch<_T> {
|
||||
pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match method_id {
|
||||
0 => server.mechanisms(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
1 => server.create_session(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod _private {
|
||||
pub const TYPE_ID: u64 = 0xeac8_d340_bf0b_c1fe;
|
||||
}
|
||||
|
||||
pub mod mechanisms_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0x83fb_333a_86c0_0444;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod mechanisms_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_mechs(self) -> ::capnp::Result<::capnp::text_list::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_mechs(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_mechs(self) -> ::capnp::Result<::capnp::text_list::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mechs(&mut self, value: ::capnp::text_list::Reader<'a>) -> ::capnp::Result<()> {
|
||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_mechs(self, size: u32) -> ::capnp::text_list::Builder<'a> {
|
||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
|
||||
}
|
||||
pub fn has_mechs(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xe749_ee32_e90c_3e2e;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod create_session_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_mechanism(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_mechanism(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_mechanism(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mechanism(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_mechanism(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_text(size)
|
||||
}
|
||||
pub fn has_mechanism(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xf90f_318c_27b5_1024;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod create_session_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_authentication(self) -> ::capnp::Result<crate::schema::auth_capnp::authentication::Client> {
|
||||
match self.reader.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_authentication(self) -> ::capnp::Result<crate::schema::auth_capnp::authentication::Client> {
|
||||
match self.builder.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_authentication(&mut self, value: crate::schema::auth_capnp::authentication::Client) {
|
||||
self.builder.get_pointer_field(0).set_capability(value.client.hook);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
pub fn get_authentication(&self) -> crate::schema::auth_capnp::authentication::Client {
|
||||
::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(0).as_cap())
|
||||
}
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xd8de_c362_5eec_4ac9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod session {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_resources(self) -> ::capnp::Result<crate::schema::resources_capnp::resources::Client> {
|
||||
match self.reader.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_users(self) -> ::capnp::Result<crate::schema::users_capnp::users::Client> {
|
||||
match self.reader.get_pointer_field(1).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_resources(self) -> ::capnp::Result<crate::schema::resources_capnp::resources::Client> {
|
||||
match self.builder.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_resources(&mut self, value: crate::schema::resources_capnp::resources::Client) {
|
||||
self.builder.get_pointer_field(0).set_capability(value.client.hook);
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_users(self) -> ::capnp::Result<crate::schema::users_capnp::users::Client> {
|
||||
match self.builder.get_pointer_field(1).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_users(&mut self, value: crate::schema::users_capnp::users::Client) {
|
||||
self.builder.get_pointer_field(1).set_capability(value.client.hook);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
pub fn get_resources(&self) -> crate::schema::resources_capnp::resources::Client {
|
||||
::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(0).as_cap())
|
||||
}
|
||||
pub fn get_users(&self) -> crate::schema::users_capnp::users::Client {
|
||||
::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(1).as_cap())
|
||||
}
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 2 };
|
||||
pub const TYPE_ID: u64 = 0x9347_ab18_2906_b9ca;
|
||||
}
|
||||
}
|
@ -1,15 +1,15 @@
|
||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
||||
// DO NOT EDIT.
|
||||
// source: users.capnp
|
||||
// source: permissionsystem.capnp
|
||||
|
||||
|
||||
|
||||
pub mod users {
|
||||
pub mod permission_system {
|
||||
#![allow(unused_variables)]
|
||||
pub type WhoamiParams<> = ::capnp::capability::Params<crate::schema::users_capnp::users::whoami_params::Owned>;
|
||||
pub type WhoamiResults<> = ::capnp::capability::Results<crate::schema::user_capnp::user::Owned>;
|
||||
pub type ManageParams<> = ::capnp::capability::Params<crate::schema::users_capnp::users::manage_params::Owned>;
|
||||
pub type ManageResults<> = ::capnp::capability::Results<crate::schema::users_capnp::users::manage_results::Owned>;
|
||||
pub type InfoParams<> = ::capnp::capability::Params<crate::schema::permissionsystem_capnp::permission_system::info_params::Owned>;
|
||||
pub type InfoResults<> = ::capnp::capability::Results<crate::schema::permissionsystem_capnp::permission_system::info_results::Owned>;
|
||||
pub type ManageParams<> = ::capnp::capability::Params<crate::schema::permissionsystem_capnp::permission_system::manage_params::Owned>;
|
||||
pub type ManageResults<> = ::capnp::capability::Results<crate::schema::permissionsystem_capnp::permission_system::manage_results::Owned>;
|
||||
|
||||
pub struct Client {
|
||||
pub client: ::capnp::capability::Client,
|
||||
@ -53,15 +53,15 @@ pub mod users {
|
||||
}
|
||||
}
|
||||
impl Client {
|
||||
pub fn whoami_request(&self) -> ::capnp::capability::Request<crate::schema::users_capnp::users::whoami_params::Owned,crate::schema::user_capnp::user::Owned> {
|
||||
pub fn info_request(&self) -> ::capnp::capability::Request<crate::schema::permissionsystem_capnp::permission_system::info_params::Owned,crate::schema::permissionsystem_capnp::permission_system::info_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
||||
}
|
||||
pub fn manage_request(&self) -> ::capnp::capability::Request<crate::schema::users_capnp::users::manage_params::Owned,crate::schema::users_capnp::users::manage_results::Owned> {
|
||||
pub fn manage_request(&self) -> ::capnp::capability::Request<crate::schema::permissionsystem_capnp::permission_system::manage_params::Owned,crate::schema::permissionsystem_capnp::permission_system::manage_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
||||
}
|
||||
}
|
||||
pub trait Server<> {
|
||||
fn whoami(&mut self, _: WhoamiParams<>, _: WhoamiResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn info(&mut self, _: InfoParams<>, _: InfoResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn manage(&mut self, _: ManageParams<>, _: ManageResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
}
|
||||
pub struct ServerDispatch<_T,> {
|
||||
@ -91,25 +91,21 @@ pub mod users {
|
||||
impl <_T :Server> ServerDispatch<_T> {
|
||||
pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match method_id {
|
||||
0 => server.whoami(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
0 => server.info(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
1 => server.manage(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod _private {
|
||||
pub const TYPE_ID: u64 = 0xf7f9_c772_e412_be16;
|
||||
pub const TYPE_ID: u64 = 0xcafb_f059_d7a0_0c3b;
|
||||
}
|
||||
|
||||
|
||||
pub mod manage {
|
||||
pub mod info {
|
||||
#![allow(unused_variables)]
|
||||
pub type ListParams<> = ::capnp::capability::Params<crate::schema::users_capnp::users::manage::list_params::Owned>;
|
||||
pub type ListResults<> = ::capnp::capability::Results<crate::schema::users_capnp::users::manage::list_results::Owned>;
|
||||
pub type AddUserParams<> = ::capnp::capability::Params<crate::schema::users_capnp::users::manage::add_user_params::Owned>;
|
||||
pub type AddUserResults<> = ::capnp::capability::Results<crate::schema::user_capnp::user::Owned>;
|
||||
pub type RemoveUserParams<> = ::capnp::capability::Params<crate::schema::user_capnp::user::Owned>;
|
||||
pub type RemoveUserResults<> = ::capnp::capability::Results<crate::schema::users_capnp::users::manage::remove_user_results::Owned>;
|
||||
pub type GetRoleListParams<> = ::capnp::capability::Params<crate::schema::permissionsystem_capnp::permission_system::info::get_role_list_params::Owned>;
|
||||
pub type GetRoleListResults<> = ::capnp::capability::Results<crate::schema::permissionsystem_capnp::permission_system::info::get_role_list_results::Owned>;
|
||||
|
||||
pub struct Client {
|
||||
pub client: ::capnp::capability::Client,
|
||||
@ -153,20 +149,12 @@ pub mod users {
|
||||
}
|
||||
}
|
||||
impl Client {
|
||||
pub fn list_request(&self) -> ::capnp::capability::Request<crate::schema::users_capnp::users::manage::list_params::Owned,crate::schema::users_capnp::users::manage::list_results::Owned> {
|
||||
pub fn get_role_list_request(&self) -> ::capnp::capability::Request<crate::schema::permissionsystem_capnp::permission_system::info::get_role_list_params::Owned,crate::schema::permissionsystem_capnp::permission_system::info::get_role_list_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
||||
}
|
||||
pub fn add_user_request(&self) -> ::capnp::capability::Request<crate::schema::users_capnp::users::manage::add_user_params::Owned,crate::schema::user_capnp::user::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
||||
}
|
||||
pub fn remove_user_request(&self) -> ::capnp::capability::Request<crate::schema::user_capnp::user::Owned,crate::schema::users_capnp::users::manage::remove_user_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 2, None)
|
||||
}
|
||||
}
|
||||
pub trait Server<> {
|
||||
fn list(&mut self, _: ListParams<>, _: ListResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn add_user(&mut self, _: AddUserParams<>, _: AddUserResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn remove_user(&mut self, _: RemoveUserParams<>, _: RemoveUserResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn get_role_list(&mut self, _: GetRoleListParams<>, _: GetRoleListResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
}
|
||||
pub struct ServerDispatch<_T,> {
|
||||
pub server: _T,
|
||||
@ -195,18 +183,16 @@ pub mod users {
|
||||
impl <_T :Server> ServerDispatch<_T> {
|
||||
pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match method_id {
|
||||
0 => server.list(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
1 => server.add_user(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
2 => server.remove_user(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
0 => server.get_role_list(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod _private {
|
||||
pub const TYPE_ID: u64 = 0xf126_12f0_bd1f_52a1;
|
||||
pub const TYPE_ID: u64 = 0xdff7_7e8f_ec2d_a43b;
|
||||
}
|
||||
|
||||
pub mod list_params {
|
||||
pub mod get_role_list_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
@ -315,11 +301,11 @@ pub mod users {
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0xe764_fc82_cdcb_2165;
|
||||
pub const TYPE_ID: u64 = 0xd5b5_fb0f_7259_c89b;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod list_results {
|
||||
pub mod get_role_list_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
@ -366,10 +352,10 @@ pub mod users {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_users(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,crate::schema::user_capnp::user::Owned>> {
|
||||
pub fn get_role_list(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,crate::schema::role_capnp::role::Owned>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_users(&self) -> bool {
|
||||
pub fn has_role_list(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
@ -423,18 +409,18 @@ pub mod users {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_users(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,crate::schema::user_capnp::user::Owned>> {
|
||||
pub fn get_role_list(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,crate::schema::role_capnp::role::Owned>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_users(&mut self, value: ::capnp::struct_list::Reader<'a,crate::schema::user_capnp::user::Owned>) -> ::capnp::Result<()> {
|
||||
pub fn set_role_list(&mut self, value: ::capnp::struct_list::Reader<'a,crate::schema::role_capnp::role::Owned>) -> ::capnp::Result<()> {
|
||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_users(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::schema::user_capnp::user::Owned> {
|
||||
pub fn init_role_list(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::schema::role_capnp::role::Owned> {
|
||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
|
||||
}
|
||||
pub fn has_users(&self) -> bool {
|
||||
pub fn has_role_list(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
@ -450,282 +436,97 @@ pub mod users {
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xb7a0_f9ef_a70f_e3a0;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod add_user_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_username(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_username(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_password(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_password(&self) -> bool {
|
||||
!self.reader.get_pointer_field(1).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_username(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_username(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_username(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_text(size)
|
||||
}
|
||||
pub fn has_username(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_password(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_password(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(1).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_password(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(1).init_text(size)
|
||||
}
|
||||
pub fn has_password(&self) -> bool {
|
||||
!self.builder.get_pointer_field(1).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 2 };
|
||||
pub const TYPE_ID: u64 = 0xf081_0d1b_aa9d_d883;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod remove_user_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0xffbb_0a58_d5e6_cf7b;
|
||||
pub const TYPE_ID: u64 = 0xc506_980d_e52d_5ab2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod whoami_params {
|
||||
|
||||
pub mod manage {
|
||||
#![allow(unused_variables)]
|
||||
|
||||
pub struct Client {
|
||||
pub client: ::capnp::capability::Client,
|
||||
}
|
||||
impl ::capnp::capability::FromClientHook for Client {
|
||||
fn new(hook: Box<dyn (::capnp::private::capability::ClientHook)>) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(hook), }
|
||||
}
|
||||
}
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Client; type Builder = Client; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Client; }
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Client<> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(reader.get_capability()?))
|
||||
}
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Client<> {
|
||||
fn init_pointer(_builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Client<> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(builder.get_capability()?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <> ::capnp::traits::SetPointerBuilder for Client<> {
|
||||
fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Client<>, _canonicalize: bool) -> ::capnp::Result<()> {
|
||||
pointer.set_capability(from.client.hook);
|
||||
::core::result::Result::Ok(())
|
||||
}
|
||||
}
|
||||
impl ::capnp::traits::HasTypeId for Client {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl Clone for Client {
|
||||
fn clone(&self) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(self.client.hook.add_ref()), }
|
||||
}
|
||||
}
|
||||
impl Client {
|
||||
}
|
||||
pub trait Server<> {
|
||||
}
|
||||
pub struct ServerDispatch<_T,> {
|
||||
pub server: _T,
|
||||
}
|
||||
impl <_S: Server + 'static, > ::capnp::capability::FromServer<_S> for Client {
|
||||
type Dispatch = ServerDispatch<_S, >;
|
||||
fn from_server(s: _S) -> ServerDispatch<_S, > {
|
||||
ServerDispatch { server: s, }
|
||||
}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::Deref for ServerDispatch<_T> {
|
||||
type Target = _T;
|
||||
fn deref(&self) -> &_T { &self.server}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::DerefMut for ServerDispatch<_T> {
|
||||
fn deref_mut(&mut self) -> &mut _T { &mut self.server}
|
||||
}
|
||||
impl <_T: Server> ::capnp::capability::Server for ServerDispatch<_T> {
|
||||
fn dispatch_call(&mut self, interface_id: u64, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match interface_id {
|
||||
_private::TYPE_ID => ServerDispatch::<_T, >::dispatch_call_internal(&mut self.server, method_id, params, results),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
impl <_T :Server> ServerDispatch<_T> {
|
||||
pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match method_id {
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod _private {
|
||||
pub const TYPE_ID: u64 = 0xfd2c_0c85_d50a_57e6;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod info_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
@ -834,7 +635,135 @@ pub mod users {
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0xdd6d_d116_c4d2_35b1;
|
||||
pub const TYPE_ID: u64 = 0xe10f_22a8_fd60_fc8a;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod info_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_info(self) -> ::capnp::Result<crate::schema::permissionsystem_capnp::permission_system::info::Client> {
|
||||
match self.reader.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_info(self) -> ::capnp::Result<crate::schema::permissionsystem_capnp::permission_system::info::Client> {
|
||||
match self.builder.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_info(&mut self, value: crate::schema::permissionsystem_capnp::permission_system::info::Client) {
|
||||
self.builder.get_pointer_field(0).set_capability(value.client.hook);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
pub fn get_info(&self) -> crate::schema::permissionsystem_capnp::permission_system::info::Client {
|
||||
::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(0).as_cap())
|
||||
}
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xc85c_26ea_dff7_6440;
|
||||
}
|
||||
}
|
||||
|
||||
@ -947,7 +876,7 @@ pub mod users {
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0xaaad_50f7_1955_4151;
|
||||
pub const TYPE_ID: u64 = 0x9a88_ca08_11fa_11f0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -998,7 +927,7 @@ pub mod users {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_manage(self) -> ::capnp::Result<crate::schema::users_capnp::users::manage::Client> {
|
||||
pub fn get_manage(self) -> ::capnp::Result<crate::schema::permissionsystem_capnp::permission_system::manage::Client> {
|
||||
match self.reader.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
}
|
||||
@ -1052,11 +981,11 @@ pub mod users {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_manage(self) -> ::capnp::Result<crate::schema::users_capnp::users::manage::Client> {
|
||||
pub fn get_manage(self) -> ::capnp::Result<crate::schema::permissionsystem_capnp::permission_system::manage::Client> {
|
||||
match self.builder.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)}
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_manage(&mut self, value: crate::schema::users_capnp::users::manage::Client) {
|
||||
pub fn set_manage(&mut self, value: crate::schema::permissionsystem_capnp::permission_system::manage::Client) {
|
||||
self.builder.get_pointer_field(0).set_capability(value.client.hook);
|
||||
}
|
||||
}
|
||||
@ -1068,14 +997,14 @@ pub mod users {
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
pub fn get_manage(&self) -> crate::schema::users_capnp::users::manage::Client {
|
||||
pub fn get_manage(&self) -> crate::schema::permissionsystem_capnp::permission_system::manage::Client {
|
||||
::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(0).as_cap())
|
||||
}
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xb5f9_352e_60d8_09ea;
|
||||
pub const TYPE_ID: u64 = 0xca25_54ce_2a90_861e;
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,486 +0,0 @@
|
||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
||||
// DO NOT EDIT.
|
||||
// source: resources.capnp
|
||||
|
||||
|
||||
|
||||
pub mod resources {
|
||||
#![allow(unused_variables)]
|
||||
pub type ListAllParams<> = ::capnp::capability::Params<crate::schema::resources_capnp::resources::list_all_params::Owned>;
|
||||
pub type ListAllResults<> = ::capnp::capability::Results<crate::schema::resources_capnp::resources::list_all_results::Owned>;
|
||||
pub type GetParams<> = ::capnp::capability::Params<crate::schema::resources_capnp::resources::get_params::Owned>;
|
||||
pub type GetResults<> = ::capnp::capability::Results<crate::schema::resource_capnp::resource::Owned>;
|
||||
|
||||
pub struct Client {
|
||||
pub client: ::capnp::capability::Client,
|
||||
}
|
||||
impl ::capnp::capability::FromClientHook for Client {
|
||||
fn new(hook: Box<dyn (::capnp::private::capability::ClientHook)>) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(hook), }
|
||||
}
|
||||
}
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Client; type Builder = Client; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Client; }
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Client<> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(reader.get_capability()?))
|
||||
}
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Client<> {
|
||||
fn init_pointer(_builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Client<> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(builder.get_capability()?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <> ::capnp::traits::SetPointerBuilder for Client<> {
|
||||
fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Client<>, _canonicalize: bool) -> ::capnp::Result<()> {
|
||||
pointer.set_capability(from.client.hook);
|
||||
::core::result::Result::Ok(())
|
||||
}
|
||||
}
|
||||
impl ::capnp::traits::HasTypeId for Client {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl Clone for Client {
|
||||
fn clone(&self) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(self.client.hook.add_ref()), }
|
||||
}
|
||||
}
|
||||
impl Client {
|
||||
pub fn list_all_request(&self) -> ::capnp::capability::Request<crate::schema::resources_capnp::resources::list_all_params::Owned,crate::schema::resources_capnp::resources::list_all_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
||||
}
|
||||
pub fn get_request(&self) -> ::capnp::capability::Request<crate::schema::resources_capnp::resources::get_params::Owned,crate::schema::resource_capnp::resource::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
||||
}
|
||||
}
|
||||
pub trait Server<> {
|
||||
fn list_all(&mut self, _: ListAllParams<>, _: ListAllResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn get(&mut self, _: GetParams<>, _: GetResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
}
|
||||
pub struct ServerDispatch<_T,> {
|
||||
pub server: _T,
|
||||
}
|
||||
impl <_S: Server + 'static, > ::capnp::capability::FromServer<_S> for Client {
|
||||
type Dispatch = ServerDispatch<_S, >;
|
||||
fn from_server(s: _S) -> ServerDispatch<_S, > {
|
||||
ServerDispatch { server: s, }
|
||||
}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::Deref for ServerDispatch<_T> {
|
||||
type Target = _T;
|
||||
fn deref(&self) -> &_T { &self.server}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::DerefMut for ServerDispatch<_T> {
|
||||
fn deref_mut(&mut self) -> &mut _T { &mut self.server}
|
||||
}
|
||||
impl <_T: Server> ::capnp::capability::Server for ServerDispatch<_T> {
|
||||
fn dispatch_call(&mut self, interface_id: u64, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match interface_id {
|
||||
_private::TYPE_ID => ServerDispatch::<_T, >::dispatch_call_internal(&mut self.server, method_id, params, results),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
impl <_T :Server> ServerDispatch<_T> {
|
||||
pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match method_id {
|
||||
0 => server.list_all(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
1 => server.get(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod _private {
|
||||
pub const TYPE_ID: u64 = 0xe0cb_db6f_4bef_1d89;
|
||||
}
|
||||
|
||||
pub mod list_all_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0x8455_6f7a_aca5_7481;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod list_all_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_list(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,crate::schema::resource_capnp::resource::Owned>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_list(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_list(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,crate::schema::resource_capnp::resource::Owned>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_list(&mut self, value: ::capnp::struct_list::Reader<'a,crate::schema::resource_capnp::resource::Owned>) -> ::capnp::Result<()> {
|
||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_list(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::schema::resource_capnp::resource::Owned> {
|
||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
|
||||
}
|
||||
pub fn has_list(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0x9f23_ef56_faac_545c;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod get_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_name(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_name(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_name(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_text(size)
|
||||
}
|
||||
pub fn has_name(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xbd48_75db_98cf_ab6b;
|
||||
}
|
||||
}
|
||||
}
|
186
api/src/schema/space_capnp.rs
Normal file
186
api/src/schema/space_capnp.rs
Normal file
@ -0,0 +1,186 @@
|
||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
||||
// DO NOT EDIT.
|
||||
// source: space.capnp
|
||||
|
||||
|
||||
pub mod space {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_id(self) -> ::capnp::Result<crate::schema::general_capnp::u_u_i_d::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_id(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_name(&self) -> bool {
|
||||
!self.reader.get_pointer_field(1).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_info(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(2), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_info(&self) -> bool {
|
||||
!self.reader.get_pointer_field(2).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_id(self) -> ::capnp::Result<crate::schema::general_capnp::u_u_i_d::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_id(&mut self, value: crate::schema::general_capnp::u_u_i_d::Reader<'_>) -> ::capnp::Result<()> {
|
||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_id(self, ) -> crate::schema::general_capnp::u_u_i_d::Builder<'a> {
|
||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
|
||||
}
|
||||
pub fn has_id(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_name(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(1).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_name(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(1).init_text(size)
|
||||
}
|
||||
pub fn has_name(&self) -> bool {
|
||||
!self.builder.get_pointer_field(1).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_info(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(2), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_info(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(2).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_info(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(2).init_text(size)
|
||||
}
|
||||
pub fn has_info(&self) -> bool {
|
||||
!self.builder.get_pointer_field(2).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
pub fn get_id(&self) -> crate::schema::general_capnp::u_u_i_d::Pipeline {
|
||||
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
|
||||
}
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 3 };
|
||||
pub const TYPE_ID: u64 = 0x9e5f_9a6a_0528_b772;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
1852
api/src/schema/usersystem_capnp.rs
Normal file
1852
api/src/schema/usersystem_capnp.rs
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,915 +0,0 @@
|
||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
||||
// DO NOT EDIT.
|
||||
// source: utils.capnp
|
||||
|
||||
|
||||
|
||||
pub mod l10_n_string {
|
||||
#![allow(unused_variables)]
|
||||
pub type GetParams<> = ::capnp::capability::Params<crate::schema::utils_capnp::l10_n_string::get_params::Owned>;
|
||||
pub type GetResults<> = ::capnp::capability::Results<crate::schema::utils_capnp::l10_n_string::get_results::Owned>;
|
||||
pub type AvailableParams<> = ::capnp::capability::Params<crate::schema::utils_capnp::l10_n_string::available_params::Owned>;
|
||||
pub type AvailableResults<> = ::capnp::capability::Results<crate::schema::utils_capnp::l10_n_string::available_results::Owned>;
|
||||
|
||||
pub struct Client {
|
||||
pub client: ::capnp::capability::Client,
|
||||
}
|
||||
impl ::capnp::capability::FromClientHook for Client {
|
||||
fn new(hook: Box<dyn (::capnp::private::capability::ClientHook)>) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(hook), }
|
||||
}
|
||||
}
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Client; type Builder = Client; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Client; }
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Client<> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(reader.get_capability()?))
|
||||
}
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Client<> {
|
||||
fn init_pointer(_builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Client<> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Client<>> {
|
||||
::core::result::Result::Ok(::capnp::capability::FromClientHook::new(builder.get_capability()?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <> ::capnp::traits::SetPointerBuilder for Client<> {
|
||||
fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Client<>, _canonicalize: bool) -> ::capnp::Result<()> {
|
||||
pointer.set_capability(from.client.hook);
|
||||
::core::result::Result::Ok(())
|
||||
}
|
||||
}
|
||||
impl ::capnp::traits::HasTypeId for Client {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl Clone for Client {
|
||||
fn clone(&self) -> Client {
|
||||
Client { client: ::capnp::capability::Client::new(self.client.hook.add_ref()), }
|
||||
}
|
||||
}
|
||||
impl Client {
|
||||
pub fn get_request(&self) -> ::capnp::capability::Request<crate::schema::utils_capnp::l10_n_string::get_params::Owned,crate::schema::utils_capnp::l10_n_string::get_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
||||
}
|
||||
pub fn available_request(&self) -> ::capnp::capability::Request<crate::schema::utils_capnp::l10_n_string::available_params::Owned,crate::schema::utils_capnp::l10_n_string::available_results::Owned> {
|
||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
||||
}
|
||||
}
|
||||
pub trait Server<> {
|
||||
fn get(&mut self, _: GetParams<>, _: GetResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
fn available(&mut self, _: AvailableParams<>, _: AvailableResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
||||
}
|
||||
pub struct ServerDispatch<_T,> {
|
||||
pub server: _T,
|
||||
}
|
||||
impl <_S: Server + 'static, > ::capnp::capability::FromServer<_S> for Client {
|
||||
type Dispatch = ServerDispatch<_S, >;
|
||||
fn from_server(s: _S) -> ServerDispatch<_S, > {
|
||||
ServerDispatch { server: s, }
|
||||
}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::Deref for ServerDispatch<_T> {
|
||||
type Target = _T;
|
||||
fn deref(&self) -> &_T { &self.server}
|
||||
}
|
||||
impl <_T: Server> ::core::ops::DerefMut for ServerDispatch<_T> {
|
||||
fn deref_mut(&mut self) -> &mut _T { &mut self.server}
|
||||
}
|
||||
impl <_T: Server> ::capnp::capability::Server for ServerDispatch<_T> {
|
||||
fn dispatch_call(&mut self, interface_id: u64, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match interface_id {
|
||||
_private::TYPE_ID => ServerDispatch::<_T, >::dispatch_call_internal(&mut self.server, method_id, params, results),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
impl <_T :Server> ServerDispatch<_T> {
|
||||
pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> {
|
||||
match method_id {
|
||||
0 => server.get(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
1 => server.available(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
||||
_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) }
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod _private {
|
||||
pub const TYPE_ID: u64 = 0xf227_58ad_b0c4_167a;
|
||||
}
|
||||
|
||||
pub mod get_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_lang(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_lang(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_lang(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_lang(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_lang(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_text(size)
|
||||
}
|
||||
pub fn has_lang(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xfa22_f0e2_2b36_3d4d;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod get_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_lang(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_lang(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_content(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_content(&self) -> bool {
|
||||
!self.reader.get_pointer_field(1).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_lang(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_lang(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_lang(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_text(size)
|
||||
}
|
||||
pub fn has_lang(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_content(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_content(&mut self, value: ::capnp::text::Reader<'_>) {
|
||||
self.builder.get_pointer_field(1).set_text(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_content(self, size: u32) -> ::capnp::text::Builder<'a> {
|
||||
self.builder.get_pointer_field(1).init_text(size)
|
||||
}
|
||||
pub fn has_content(&self) -> bool {
|
||||
!self.builder.get_pointer_field(1).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 2 };
|
||||
pub const TYPE_ID: u64 = 0xe50c_214f_cee3_3c4c;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod available_params {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0x9630_7e43_ff1d_b90f;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod available_results {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_langs(self) -> ::capnp::Result<::capnp::text_list::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_langs(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_langs(self) -> ::capnp::Result<::capnp::text_list::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_langs(&mut self, value: ::capnp::text_list::Reader<'a>) -> ::capnp::Result<()> {
|
||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_langs(self, size: u32) -> ::capnp::text_list::Builder<'a> {
|
||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
|
||||
}
|
||||
pub fn has_langs(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xc3be_1fc3_f202_e2a1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod u_u_i_d {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_lower(self) -> u64 {
|
||||
self.reader.get_data_field::<u64>(0)
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_upper(self) -> u64 {
|
||||
self.reader.get_data_field::<u64>(1)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_lower(self) -> u64 {
|
||||
self.builder.get_data_field::<u64>(0)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_lower(&mut self, value: u64) {
|
||||
self.builder.set_data_field::<u64>(0, value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_upper(self) -> u64 {
|
||||
self.builder.get_data_field::<u64>(1)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_upper(&mut self, value: u64) {
|
||||
self.builder.set_data_field::<u64>(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 2, pointers: 0 };
|
||||
pub const TYPE_ID: u64 = 0xdd58_1d18_a8f5_d008;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod o_i_d {
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Owned(());
|
||||
impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; }
|
||||
impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; }
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> }
|
||||
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> {
|
||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> {
|
||||
Reader { reader, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> {
|
||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> {
|
||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> {
|
||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> Reader<'a,> {
|
||||
pub fn reborrow(&self) -> Reader<'_,> {
|
||||
Reader { .. *self }
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.reader.total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_bytes(self) -> ::capnp::Result<::capnp::data::Reader<'a>> {
|
||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
pub fn has_bytes(&self) -> bool {
|
||||
!self.reader.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> }
|
||||
impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> {
|
||||
#[inline]
|
||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> {
|
||||
#[inline]
|
||||
fn type_id() -> u64 { _private::TYPE_ID }
|
||||
}
|
||||
impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> {
|
||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > {
|
||||
Builder { builder, }
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> {
|
||||
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
|
||||
self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> {
|
||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> {
|
||||
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
|
||||
}
|
||||
fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Builder<'a,>> {
|
||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> {
|
||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
||||
}
|
||||
|
||||
impl <'a,> Builder<'a,> {
|
||||
pub fn into_reader(self) -> Reader<'a,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
pub fn reborrow(&mut self) -> Builder<'_,> {
|
||||
Builder { .. *self }
|
||||
}
|
||||
pub fn reborrow_as_reader(&self) -> Reader<'_,> {
|
||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
||||
}
|
||||
|
||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
||||
self.builder.into_reader().total_size()
|
||||
}
|
||||
#[inline]
|
||||
pub fn get_bytes(self) -> ::capnp::Result<::capnp::data::Builder<'a>> {
|
||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_bytes(&mut self, value: ::capnp::data::Reader<'_>) {
|
||||
self.builder.get_pointer_field(0).set_data(value);
|
||||
}
|
||||
#[inline]
|
||||
pub fn init_bytes(self, size: u32) -> ::capnp::data::Builder<'a> {
|
||||
self.builder.get_pointer_field(0).init_data(size)
|
||||
}
|
||||
pub fn has_bytes(&self) -> bool {
|
||||
!self.builder.get_pointer_field(0).is_null()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline }
|
||||
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
|
||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
|
||||
Pipeline { _typeless: typeless, }
|
||||
}
|
||||
}
|
||||
impl Pipeline {
|
||||
}
|
||||
mod _private {
|
||||
use capnp::private::layout;
|
||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 };
|
||||
pub const TYPE_ID: u64 = 0xa084_2f68_5b24_7052;
|
||||
}
|
||||
}
|
0
bffhd/authorization/mod.rs
Normal file
0
bffhd/authorization/mod.rs
Normal file
0
bffhd/authorization/roles.rs
Normal file
0
bffhd/authorization/roles.rs
Normal file
0
bffhd/capnp/machine.rs
Normal file
0
bffhd/capnp/machine.rs
Normal file
0
bffhd/capnp/permissionsystem.rs
Normal file
0
bffhd/capnp/permissionsystem.rs
Normal file
0
bffhd/capnp/user.rs
Normal file
0
bffhd/capnp/user.rs
Normal file
0
bffhd/db/index.rs
Normal file
0
bffhd/db/index.rs
Normal file
@ -1,5 +0,0 @@
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Resources {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user