mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-10 17:43:23 +01:00
Merge branch 'feature/schema-updates' into development
* feature/schema-updates: Update api dependency in Cargo.lock Update api version Update build.rs to not output to tracked dir Drop git tracked pregenerated code Drop pregenerated modules Update API submodule
This commit is contained in:
commit
2cb7a28967
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -72,7 +72,7 @@ checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "api"
|
name = "api"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"capnp",
|
"capnp",
|
||||||
"capnpc",
|
"capnpc",
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "api"
|
name = "api"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
publish = false
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
generated = []
|
generated = []
|
||||||
@ -17,4 +16,4 @@ capnpc = "0.14.4"
|
|||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
capnpc = "0.14.4"
|
capnpc = "0.14.4"
|
||||||
# Used in build.rs to iterate over all files in schema/
|
# Used in build.rs to iterate over all files in schema/
|
||||||
walkdir = "2.3.2"
|
walkdir = "2.3.2"
|
33
api/build.rs
33
api/build.rs
@ -8,8 +8,7 @@ fn is_hidden(entry: &DirEntry) -> bool {
|
|||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "gen_static"))]
|
fn generate_api() {
|
||||||
fn main() {
|
|
||||||
println!("cargo:rerun-if-changed=schema");
|
println!("cargo:rerun-if-changed=schema");
|
||||||
let mut compile_command = ::capnpc::CompilerCommand::new();
|
let mut compile_command = ::capnpc::CompilerCommand::new();
|
||||||
compile_command
|
compile_command
|
||||||
@ -38,34 +37,6 @@ fn main() {
|
|||||||
compile_command.run().expect("Failed to generate API code");
|
compile_command.run().expect("Failed to generate API code");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gen_static")]
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rerun-if-changed=schema");
|
generate_api();
|
||||||
let mut compile_command = ::capnpc::CompilerCommand::new();
|
|
||||||
compile_command
|
|
||||||
.src_prefix("schema")
|
|
||||||
.output_path("src/schema")
|
|
||||||
.default_parent_module(vec!["schema".to_string()]);
|
|
||||||
|
|
||||||
for entry in WalkDir::new("schema")
|
|
||||||
.max_depth(2)
|
|
||||||
.into_iter()
|
|
||||||
.filter_entry(|e| !is_hidden(e))
|
|
||||||
.filter_map(Result::ok) // Filter all entries that access failed on
|
|
||||||
.filter(|e| !e.file_type().is_dir()) // Filter directories
|
|
||||||
// Filter non-schema files
|
|
||||||
.filter(|e| {
|
|
||||||
e.file_name()
|
|
||||||
.to_str()
|
|
||||||
.map(|s| s.ends_with(".capnp"))
|
|
||||||
.unwrap_or(false)
|
|
||||||
})
|
|
||||||
{
|
|
||||||
println!("Collecting schema file {}", entry.path().display());
|
|
||||||
compile_command.file(entry.path());
|
|
||||||
}
|
|
||||||
|
|
||||||
compile_command
|
|
||||||
.run()
|
|
||||||
.expect("Failed to generate extra API code");
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 244eb9bd1b59cfcf36c067ff0d6208c0992766ba
|
Subproject commit 19f20f5154f0eced6288ff56cac840025ee51da1
|
@ -1,71 +1,41 @@
|
|||||||
pub use capnpc::schema_capnp;
|
pub use capnpc::schema_capnp;
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod authenticationsystem_capnp {
|
pub mod authenticationsystem_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/authenticationsystem_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/authenticationsystem_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod authenticationsystem_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod connection_capnp {
|
pub mod connection_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/connection_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/connection_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod connection_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod general_capnp {
|
pub mod general_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/general_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/general_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod general_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod machine_capnp {
|
pub mod machine_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/machine_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/machine_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod machine_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod machinesystem_capnp {
|
pub mod machinesystem_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/machinesystem_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/machinesystem_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod machinesystem_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod permissionsystem_capnp {
|
pub mod permissionsystem_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/permissionsystem_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/permissionsystem_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod permissionsystem_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod role_capnp {
|
pub mod role_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/role_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/role_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod role_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod space_capnp {
|
pub mod space_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/space_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/space_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod space_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod user_capnp {
|
pub mod user_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/user_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/user_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod user_capnp;
|
|
||||||
|
|
||||||
#[cfg(feature = "generated")]
|
|
||||||
pub mod usersystem_capnp {
|
pub mod usersystem_capnp {
|
||||||
include!(concat!(env!("OUT_DIR"), "/usersystem_capnp.rs"));
|
include!(concat!(env!("OUT_DIR"), "/usersystem_capnp.rs"));
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "generated"))]
|
|
||||||
pub mod usersystem_capnp;
|
|
||||||
|
@ -1,996 +0,0 @@
|
|||||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
|
||||||
// DO NOT EDIT.
|
|
||||||
// source: authenticationsystem.capnp
|
|
||||||
|
|
||||||
|
|
||||||
pub mod response {
|
|
||||||
pub use self::Which::{Failed,Challenge,Successful};
|
|
||||||
|
|
||||||
#[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 fn has_challenge(&self) -> bool {
|
|
||||||
if self.reader.get_data_field::<u16>(1) != 1 { return false; }
|
|
||||||
!self.reader.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn which(self) -> ::core::result::Result<WhichReader<'a,>, ::capnp::NotInSchema> {
|
|
||||||
match self.reader.get_data_field::<u16>(1) {
|
|
||||||
0 => {
|
|
||||||
::core::result::Result::Ok(Failed(
|
|
||||||
::capnp::traits::FromStructReader::new(self.reader)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
1 => {
|
|
||||||
::core::result::Result::Ok(Challenge(
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
2 => {
|
|
||||||
::core::result::Result::Ok(Successful(
|
|
||||||
::capnp::traits::FromStructReader::new(self.reader)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
x => ::core::result::Result::Err(::capnp::NotInSchema(x))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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 init_failed(self, ) -> crate::schema::authenticationsystem_capnp::response::failed::Builder<'a> {
|
|
||||||
self.builder.set_data_field::<u16>(1, 0);
|
|
||||||
self.builder.set_data_field::<u16>(0, 0u16);
|
|
||||||
self.builder.get_pointer_field(0).clear();
|
|
||||||
::capnp::traits::FromStructBuilder::new(self.builder)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_challenge(&mut self, value: ::capnp::data::Reader<'_>) {
|
|
||||||
self.builder.set_data_field::<u16>(1, 1);
|
|
||||||
self.builder.get_pointer_field(0).set_data(value);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_challenge(self, size: u32) -> ::capnp::data::Builder<'a> {
|
|
||||||
self.builder.set_data_field::<u16>(1, 1);
|
|
||||||
self.builder.get_pointer_field(0).init_data(size)
|
|
||||||
}
|
|
||||||
pub fn has_challenge(&self) -> bool {
|
|
||||||
if self.builder.get_data_field::<u16>(1) != 1 { return false; }
|
|
||||||
!self.builder.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_successful(self, ) -> crate::schema::authenticationsystem_capnp::response::successful::Builder<'a> {
|
|
||||||
self.builder.set_data_field::<u16>(1, 2);
|
|
||||||
self.builder.get_pointer_field(0).clear();
|
|
||||||
self.builder.get_pointer_field(1).clear();
|
|
||||||
::capnp::traits::FromStructBuilder::new(self.builder)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a,>, ::capnp::NotInSchema> {
|
|
||||||
match self.builder.get_data_field::<u16>(1) {
|
|
||||||
0 => {
|
|
||||||
::core::result::Result::Ok(Failed(
|
|
||||||
::capnp::traits::FromStructBuilder::new(self.builder)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
1 => {
|
|
||||||
::core::result::Result::Ok(Challenge(
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
2 => {
|
|
||||||
::core::result::Result::Ok(Successful(
|
|
||||||
::capnp::traits::FromStructBuilder::new(self.builder)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
x => ::core::result::Result::Err(::capnp::NotInSchema(x))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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: 1, pointers: 2 };
|
|
||||||
pub const TYPE_ID: u64 = 0xe76b_4158_bdde_4934;
|
|
||||||
}
|
|
||||||
pub enum Which<A0,A1,A2> {
|
|
||||||
Failed(A0),
|
|
||||||
Challenge(A1),
|
|
||||||
Successful(A2),
|
|
||||||
}
|
|
||||||
pub type WhichReader<'a,> = Which<crate::schema::authenticationsystem_capnp::response::failed::Reader<'a>,::capnp::Result<::capnp::data::Reader<'a>>,crate::schema::authenticationsystem_capnp::response::successful::Reader<'a>>;
|
|
||||||
pub type WhichBuilder<'a,> = Which<crate::schema::authenticationsystem_capnp::response::failed::Builder<'a>,::capnp::Result<::capnp::data::Builder<'a>>,crate::schema::authenticationsystem_capnp::response::successful::Builder<'a>>;
|
|
||||||
|
|
||||||
#[repr(u16)]
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
||||||
pub enum Error {
|
|
||||||
Aborted = 0,
|
|
||||||
BadMechanism = 1,
|
|
||||||
InvalidCredentials = 2,
|
|
||||||
Failed = 3,
|
|
||||||
}
|
|
||||||
impl ::capnp::traits::FromU16 for Error {
|
|
||||||
#[inline]
|
|
||||||
fn from_u16(value: u16) -> ::core::result::Result<Error, ::capnp::NotInSchema> {
|
|
||||||
match value {
|
|
||||||
0 => ::core::result::Result::Ok(Error::Aborted),
|
|
||||||
1 => ::core::result::Result::Ok(Error::BadMechanism),
|
|
||||||
2 => ::core::result::Result::Ok(Error::InvalidCredentials),
|
|
||||||
3 => ::core::result::Result::Ok(Error::Failed),
|
|
||||||
n => ::core::result::Result::Err(::capnp::NotInSchema(n)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl ::capnp::traits::ToU16 for Error {
|
|
||||||
#[inline]
|
|
||||||
fn to_u16(self) -> u16 { self as u16 }
|
|
||||||
}
|
|
||||||
impl ::capnp::traits::HasTypeId for Error {
|
|
||||||
#[inline]
|
|
||||||
fn type_id() -> u64 { 0xe87e_ae86_8b88_cfc1u64 }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod failed {
|
|
||||||
#[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_code(self) -> ::core::result::Result<crate::schema::authenticationsystem_capnp::response::Error,::capnp::NotInSchema> {
|
|
||||||
::capnp::traits::FromU16::from_u16(self.reader.get_data_field::<u16>(0))
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_additional_data(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_additional_data(&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_code(self) -> ::core::result::Result<crate::schema::authenticationsystem_capnp::response::Error,::capnp::NotInSchema> {
|
|
||||||
::capnp::traits::FromU16::from_u16(self.builder.get_data_field::<u16>(0))
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_code(&mut self, value: crate::schema::authenticationsystem_capnp::response::Error) {
|
|
||||||
self.builder.set_data_field::<u16>(0, value as u16)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_additional_data(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_additional_data(&mut self, value: ::capnp::data::Reader<'_>) {
|
|
||||||
self.builder.get_pointer_field(0).set_data(value);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_additional_data(self, size: u32) -> ::capnp::data::Builder<'a> {
|
|
||||||
self.builder.get_pointer_field(0).init_data(size)
|
|
||||||
}
|
|
||||||
pub fn has_additional_data(&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: 1, pointers: 2 };
|
|
||||||
pub const TYPE_ID: u64 = 0xd726_d467_66b2_fd0c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod successful {
|
|
||||||
#[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_session(self) -> ::capnp::Result<crate::schema::connection_capnp::session::Reader<'a>> {
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
}
|
|
||||||
pub fn has_session(&self) -> bool {
|
|
||||||
!self.reader.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_additional_data(self) -> ::capnp::Result<::capnp::data::Reader<'a>> {
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None)
|
|
||||||
}
|
|
||||||
pub fn has_additional_data(&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_session(self) -> ::capnp::Result<crate::schema::connection_capnp::session::Builder<'a>> {
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_session(&mut self, value: crate::schema::connection_capnp::session::Reader<'_>) -> ::capnp::Result<()> {
|
|
||||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_session(self, ) -> crate::schema::connection_capnp::session::Builder<'a> {
|
|
||||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
|
|
||||||
}
|
|
||||||
pub fn has_session(&self) -> bool {
|
|
||||||
!self.builder.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_additional_data(self) -> ::capnp::Result<::capnp::data::Builder<'a>> {
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_additional_data(&mut self, value: ::capnp::data::Reader<'_>) {
|
|
||||||
self.builder.get_pointer_field(1).set_data(value);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_additional_data(self, size: u32) -> ::capnp::data::Builder<'a> {
|
|
||||||
self.builder.get_pointer_field(1).init_data(size)
|
|
||||||
}
|
|
||||||
pub fn has_additional_data(&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 {
|
|
||||||
pub fn get_session(&self) -> crate::schema::connection_capnp::session::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: 1, pointers: 2 };
|
|
||||||
pub const TYPE_ID: u64 = 0xbf3b_c966_6eea_ffa0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pub mod authentication {
|
|
||||||
#![allow(unused_variables)]
|
|
||||||
pub type StepParams<> = ::capnp::capability::Params<crate::schema::authenticationsystem_capnp::authentication::step_params::Owned>;
|
|
||||||
pub type StepResults<> = ::capnp::capability::Results<crate::schema::authenticationsystem_capnp::response::Owned>;
|
|
||||||
pub type AbortParams<> = ::capnp::capability::Params<crate::schema::authenticationsystem_capnp::authentication::abort_params::Owned>;
|
|
||||||
pub type AbortResults<> = ::capnp::capability::Results<crate::schema::authenticationsystem_capnp::authentication::abort_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 step_request(&self) -> ::capnp::capability::Request<crate::schema::authenticationsystem_capnp::authentication::step_params::Owned,crate::schema::authenticationsystem_capnp::response::Owned> {
|
|
||||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
|
||||||
}
|
|
||||||
pub fn abort_request(&self) -> ::capnp::capability::Request<crate::schema::authenticationsystem_capnp::authentication::abort_params::Owned,crate::schema::authenticationsystem_capnp::authentication::abort_results::Owned> {
|
|
||||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub trait Server<> {
|
|
||||||
fn step(&mut self, _: StepParams<>, _: StepResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
|
||||||
fn abort(&mut self, _: AbortParams<>, _: AbortResults<>) -> ::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.step(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
|
||||||
1 => server.abort(::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 = 0xe657_e27e_b5ff_b1ad;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod step_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_data(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_data(&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_data(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_data(&mut self, value: ::capnp::data::Reader<'_>) {
|
|
||||||
self.builder.get_pointer_field(0).set_data(value);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_data(self, size: u32) -> ::capnp::data::Builder<'a> {
|
|
||||||
self.builder.get_pointer_field(0).init_data(size)
|
|
||||||
}
|
|
||||||
pub fn has_data(&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 = 0xcb98_01a0_63fb_684e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod abort_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 = 0x9dbb_e5bb_dcce_a62c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod abort_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 = 0xce2f_5a64_8658_0299;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,699 +0,0 @@
|
|||||||
// @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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod optional { /* T */
|
|
||||||
pub use self::Which::{Nothing,Just};
|
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
|
||||||
pub struct Owned<T> {
|
|
||||||
_phantom: ::core::marker::PhantomData<T>
|
|
||||||
}
|
|
||||||
impl <'a, T> ::capnp::traits::Owned<'a> for Owned <T> where T: for<'c> ::capnp::traits::Owned<'c> { type Reader = Reader<'a, T>; type Builder = Builder<'a, T>; }
|
|
||||||
impl <'a, T> ::capnp::traits::OwnedStruct<'a> for Owned <T> where T: for<'c> ::capnp::traits::Owned<'c> { type Reader = Reader<'a, T>; type Builder = Builder<'a, T>; }
|
|
||||||
impl <T> ::capnp::traits::Pipelined for Owned<T> where T: for<'c> ::capnp::traits::Owned<'c> { type Pipeline = Pipeline<T>; }
|
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
|
||||||
pub struct Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
reader: ::capnp::private::layout::StructReader<'a>,
|
|
||||||
_phantom: ::core::marker::PhantomData<T>
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> ::capnp::traits::HasTypeId for Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
#[inline]
|
|
||||||
fn type_id() -> u64 { _private::TYPE_ID }
|
|
||||||
}
|
|
||||||
impl <'a,T> ::capnp::traits::FromStructReader<'a> for Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,T> {
|
|
||||||
Reader { reader, _phantom: ::core::marker::PhantomData, }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> ::capnp::traits::FromPointerReader<'a> for Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,T>> {
|
|
||||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
|
||||||
self.reader
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> ::capnp::traits::Imbue<'a> for Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
|
||||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
pub fn reborrow(&self) -> Reader<'_,T> {
|
|
||||||
Reader { .. *self }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
|
||||||
self.reader.total_size()
|
|
||||||
}
|
|
||||||
pub fn has_just(&self) -> bool {
|
|
||||||
if self.reader.get_data_field::<u16>(0) != 1 { return false; }
|
|
||||||
!self.reader.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn which(self) -> ::core::result::Result<WhichReader<'a,T>, ::capnp::NotInSchema> {
|
|
||||||
match self.reader.get_data_field::<u16>(0) {
|
|
||||||
0 => {
|
|
||||||
::core::result::Result::Ok(Nothing(
|
|
||||||
()
|
|
||||||
))
|
|
||||||
}
|
|
||||||
1 => {
|
|
||||||
::core::result::Result::Ok(Just(
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
x => ::core::result::Result::Err(::capnp::NotInSchema(x))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
builder: ::capnp::private::layout::StructBuilder<'a>,
|
|
||||||
_phantom: ::core::marker::PhantomData<T>
|
|
||||||
}
|
|
||||||
impl <'a,T> ::capnp::traits::HasStructSize for Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
#[inline]
|
|
||||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
|
||||||
}
|
|
||||||
impl <'a,T> ::capnp::traits::HasTypeId for Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
#[inline]
|
|
||||||
fn type_id() -> u64 { _private::TYPE_ID }
|
|
||||||
}
|
|
||||||
impl <'a,T> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, T> {
|
|
||||||
Builder { builder, _phantom: ::core::marker::PhantomData, }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> ::capnp::traits::ImbueMut<'a> for Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
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,T> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,T> {
|
|
||||||
::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,T>> {
|
|
||||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> ::capnp::traits::SetPointerBuilder for Reader<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,T>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T> Builder<'a,T> where T: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
pub fn into_reader(self) -> Reader<'a,T> {
|
|
||||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
|
||||||
}
|
|
||||||
pub fn reborrow(&mut self) -> Builder<'_,T> {
|
|
||||||
Builder { .. *self }
|
|
||||||
}
|
|
||||||
pub fn reborrow_as_reader(&self) -> Reader<'_,T> {
|
|
||||||
::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 set_nothing(&mut self, _value: ()) {
|
|
||||||
self.builder.set_data_field::<u16>(0, 0);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn initn_just(self, length: u32) -> <T as ::capnp::traits::Owned<'a>>::Builder {
|
|
||||||
self.builder.set_data_field::<u16>(0, 1);
|
|
||||||
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).initn_as(length)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_just(&mut self, value: <T as ::capnp::traits::Owned<'_>>::Reader) -> ::capnp::Result<()> {
|
|
||||||
self.builder.set_data_field::<u16>(0, 1);
|
|
||||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_just(self, ) -> <T as ::capnp::traits::Owned<'a>>::Builder {
|
|
||||||
self.builder.set_data_field::<u16>(0, 1);
|
|
||||||
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).init_as()
|
|
||||||
}
|
|
||||||
pub fn has_just(&self) -> bool {
|
|
||||||
if self.builder.get_data_field::<u16>(0) != 1 { return false; }
|
|
||||||
!self.builder.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a,T>, ::capnp::NotInSchema> {
|
|
||||||
match self.builder.get_data_field::<u16>(0) {
|
|
||||||
0 => {
|
|
||||||
::core::result::Result::Ok(Nothing(
|
|
||||||
()
|
|
||||||
))
|
|
||||||
}
|
|
||||||
1 => {
|
|
||||||
::core::result::Result::Ok(Just(
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
x => ::core::result::Result::Err(::capnp::NotInSchema(x))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Pipeline<T> {
|
|
||||||
_typeless: ::capnp::any_pointer::Pipeline,
|
|
||||||
_phantom: ::core::marker::PhantomData<T>
|
|
||||||
}
|
|
||||||
impl<T> ::capnp::capability::FromTypelessPipeline for Pipeline<T> {
|
|
||||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline<T> {
|
|
||||||
Pipeline { _typeless: typeless, _phantom: ::core::marker::PhantomData, }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl<T> Pipeline<T> where T: ::capnp::traits::Pipelined, <T as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline {
|
|
||||||
}
|
|
||||||
mod _private {
|
|
||||||
use capnp::private::layout;
|
|
||||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 1, pointers: 1 };
|
|
||||||
pub const TYPE_ID: u64 = 0xd77e_cca2_05b0_6927;
|
|
||||||
}
|
|
||||||
pub enum Which<A0> {
|
|
||||||
Nothing(()),
|
|
||||||
Just(A0),
|
|
||||||
}
|
|
||||||
pub type WhichReader<'a,T> = Which<::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Reader>>;
|
|
||||||
pub type WhichBuilder<'a,T> = Which<::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Builder>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod fallible { /* T,E */
|
|
||||||
pub use self::Which::{Failed,Successful};
|
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
|
||||||
pub struct Owned<T,E> {
|
|
||||||
_phantom: ::core::marker::PhantomData<(T,E)>
|
|
||||||
}
|
|
||||||
impl <'a, T,E> ::capnp::traits::Owned<'a> for Owned <T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> { type Reader = Reader<'a, T,E>; type Builder = Builder<'a, T,E>; }
|
|
||||||
impl <'a, T,E> ::capnp::traits::OwnedStruct<'a> for Owned <T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> { type Reader = Reader<'a, T,E>; type Builder = Builder<'a, T,E>; }
|
|
||||||
impl <T,E> ::capnp::traits::Pipelined for Owned<T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> { type Pipeline = Pipeline<T,E>; }
|
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
|
||||||
pub struct Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
reader: ::capnp::private::layout::StructReader<'a>,
|
|
||||||
_phantom: ::core::marker::PhantomData<(T,E)>
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> ::capnp::traits::HasTypeId for Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
#[inline]
|
|
||||||
fn type_id() -> u64 { _private::TYPE_ID }
|
|
||||||
}
|
|
||||||
impl <'a,T,E> ::capnp::traits::FromStructReader<'a> for Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,T,E> {
|
|
||||||
Reader { reader, _phantom: ::core::marker::PhantomData, }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> ::capnp::traits::FromPointerReader<'a> for Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result<Reader<'a,T,E>> {
|
|
||||||
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
|
|
||||||
self.reader
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> ::capnp::traits::Imbue<'a> for Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
|
|
||||||
self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
pub fn reborrow(&self) -> Reader<'_,T,E> {
|
|
||||||
Reader { .. *self }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
|
|
||||||
self.reader.total_size()
|
|
||||||
}
|
|
||||||
pub fn has_failed(&self) -> bool {
|
|
||||||
if self.reader.get_data_field::<u16>(0) != 0 { return false; }
|
|
||||||
!self.reader.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
pub fn has_successful(&self) -> bool {
|
|
||||||
if self.reader.get_data_field::<u16>(0) != 1 { return false; }
|
|
||||||
!self.reader.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn which(self) -> ::core::result::Result<WhichReader<'a,T,E>, ::capnp::NotInSchema> {
|
|
||||||
match self.reader.get_data_field::<u16>(0) {
|
|
||||||
0 => {
|
|
||||||
::core::result::Result::Ok(Failed(
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
1 => {
|
|
||||||
::core::result::Result::Ok(Successful(
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
x => ::core::result::Result::Err(::capnp::NotInSchema(x))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
builder: ::capnp::private::layout::StructBuilder<'a>,
|
|
||||||
_phantom: ::core::marker::PhantomData<(T,E)>
|
|
||||||
}
|
|
||||||
impl <'a,T,E> ::capnp::traits::HasStructSize for Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
#[inline]
|
|
||||||
fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE }
|
|
||||||
}
|
|
||||||
impl <'a,T,E> ::capnp::traits::HasTypeId for Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
#[inline]
|
|
||||||
fn type_id() -> u64 { _private::TYPE_ID }
|
|
||||||
}
|
|
||||||
impl <'a,T,E> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, T,E> {
|
|
||||||
Builder { builder, _phantom: ::core::marker::PhantomData, }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> ::capnp::traits::ImbueMut<'a> for Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
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,T,E> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,T,E> {
|
|
||||||
::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,T,E>> {
|
|
||||||
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> ::capnp::traits::SetPointerBuilder for Reader<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,T,E>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <'a,T,E> Builder<'a,T,E> where T: for<'c> ::capnp::traits::Owned<'c>, E: for<'c> ::capnp::traits::Owned<'c> {
|
|
||||||
pub fn into_reader(self) -> Reader<'a,T,E> {
|
|
||||||
::capnp::traits::FromStructReader::new(self.builder.into_reader())
|
|
||||||
}
|
|
||||||
pub fn reborrow(&mut self) -> Builder<'_,T,E> {
|
|
||||||
Builder { .. *self }
|
|
||||||
}
|
|
||||||
pub fn reborrow_as_reader(&self) -> Reader<'_,T,E> {
|
|
||||||
::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 initn_failed(self, length: u32) -> <E as ::capnp::traits::Owned<'a>>::Builder {
|
|
||||||
self.builder.set_data_field::<u16>(0, 0);
|
|
||||||
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).initn_as(length)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_failed(&mut self, value: <E as ::capnp::traits::Owned<'_>>::Reader) -> ::capnp::Result<()> {
|
|
||||||
self.builder.set_data_field::<u16>(0, 0);
|
|
||||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_failed(self, ) -> <E as ::capnp::traits::Owned<'a>>::Builder {
|
|
||||||
self.builder.set_data_field::<u16>(0, 0);
|
|
||||||
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).init_as()
|
|
||||||
}
|
|
||||||
pub fn has_failed(&self) -> bool {
|
|
||||||
if self.builder.get_data_field::<u16>(0) != 0 { return false; }
|
|
||||||
!self.builder.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn initn_successful(self, length: u32) -> <T as ::capnp::traits::Owned<'a>>::Builder {
|
|
||||||
self.builder.set_data_field::<u16>(0, 1);
|
|
||||||
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).initn_as(length)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_successful(&mut self, value: <T as ::capnp::traits::Owned<'_>>::Reader) -> ::capnp::Result<()> {
|
|
||||||
self.builder.set_data_field::<u16>(0, 1);
|
|
||||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_successful(self, ) -> <T as ::capnp::traits::Owned<'a>>::Builder {
|
|
||||||
self.builder.set_data_field::<u16>(0, 1);
|
|
||||||
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).init_as()
|
|
||||||
}
|
|
||||||
pub fn has_successful(&self) -> bool {
|
|
||||||
if self.builder.get_data_field::<u16>(0) != 1 { return false; }
|
|
||||||
!self.builder.get_pointer_field(0).is_null()
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a,T,E>, ::capnp::NotInSchema> {
|
|
||||||
match self.builder.get_data_field::<u16>(0) {
|
|
||||||
0 => {
|
|
||||||
::core::result::Result::Ok(Failed(
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
1 => {
|
|
||||||
::core::result::Result::Ok(Successful(
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
x => ::core::result::Result::Err(::capnp::NotInSchema(x))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct Pipeline<T,E> {
|
|
||||||
_typeless: ::capnp::any_pointer::Pipeline,
|
|
||||||
_phantom: ::core::marker::PhantomData<(T,E)>
|
|
||||||
}
|
|
||||||
impl<T,E> ::capnp::capability::FromTypelessPipeline for Pipeline<T,E> {
|
|
||||||
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline<T,E> {
|
|
||||||
Pipeline { _typeless: typeless, _phantom: ::core::marker::PhantomData, }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl<T,E> Pipeline<T,E> where T: ::capnp::traits::Pipelined, <T as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline, E: ::capnp::traits::Pipelined, <E as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline {
|
|
||||||
}
|
|
||||||
mod _private {
|
|
||||||
use capnp::private::layout;
|
|
||||||
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 1, pointers: 1 };
|
|
||||||
pub const TYPE_ID: u64 = 0xf477_aafa_9205_11aa;
|
|
||||||
}
|
|
||||||
pub enum Which<A0,A1> {
|
|
||||||
Failed(A0),
|
|
||||||
Successful(A1),
|
|
||||||
}
|
|
||||||
pub type WhichReader<'a,T,E> = Which<::capnp::Result<<E as ::capnp::traits::Owned<'a>>::Reader>,::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Reader>>;
|
|
||||||
pub type WhichBuilder<'a,T,E> = Which<::capnp::Result<<E as ::capnp::traits::Owned<'a>>::Builder>,::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Builder>>;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,756 +0,0 @@
|
|||||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
|
||||||
// DO NOT EDIT.
|
|
||||||
// source: machinesystem.capnp
|
|
||||||
|
|
||||||
|
|
||||||
pub mod machine_system {
|
|
||||||
#[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::machinesystem_capnp::machine_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::machinesystem_capnp::machine_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::machinesystem_capnp::machine_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::machinesystem_capnp::machine_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 = 0x8771_90c7_e487_ddb6;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pub mod info {
|
|
||||||
#![allow(unused_variables)]
|
|
||||||
pub type GetMachineListParams<> = ::capnp::capability::Params<crate::schema::machinesystem_capnp::machine_system::info::get_machine_list_params::Owned>;
|
|
||||||
pub type GetMachineListResults<> = ::capnp::capability::Results<crate::schema::machinesystem_capnp::machine_system::info::get_machine_list_results::Owned>;
|
|
||||||
pub type GetMachineParams<> = ::capnp::capability::Params<crate::schema::machinesystem_capnp::machine_system::info::get_machine_params::Owned>;
|
|
||||||
pub type GetMachineResults<> = ::capnp::capability::Results<crate::schema::general_capnp::optional::Owned<crate::schema::machine_capnp::machine::Owned>>;
|
|
||||||
pub type GetMachineURNParams<> = ::capnp::capability::Params<crate::schema::machinesystem_capnp::machine_system::info::get_machine_u_r_n_params::Owned>;
|
|
||||||
pub type GetMachineURNResults<> = ::capnp::capability::Results<crate::schema::general_capnp::optional::Owned<crate::schema::machine_capnp::machine::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_machine_list_request(&self) -> ::capnp::capability::Request<crate::schema::machinesystem_capnp::machine_system::info::get_machine_list_params::Owned,crate::schema::machinesystem_capnp::machine_system::info::get_machine_list_results::Owned> {
|
|
||||||
self.client.new_call(_private::TYPE_ID, 0, None)
|
|
||||||
}
|
|
||||||
pub fn get_machine_request(&self) -> ::capnp::capability::Request<crate::schema::machinesystem_capnp::machine_system::info::get_machine_params::Owned,crate::schema::general_capnp::optional::Owned<crate::schema::machine_capnp::machine::Owned>> {
|
|
||||||
self.client.new_call(_private::TYPE_ID, 1, None)
|
|
||||||
}
|
|
||||||
pub fn get_machine_u_r_n_request(&self) -> ::capnp::capability::Request<crate::schema::machinesystem_capnp::machine_system::info::get_machine_u_r_n_params::Owned,crate::schema::general_capnp::optional::Owned<crate::schema::machine_capnp::machine::Owned>> {
|
|
||||||
self.client.new_call(_private::TYPE_ID, 2, None)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub trait Server<> {
|
|
||||||
fn get_machine_list(&mut self, _: GetMachineListParams<>, _: GetMachineListResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
|
||||||
fn get_machine(&mut self, _: GetMachineParams<>, _: GetMachineResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) }
|
|
||||||
fn get_machine_u_r_n(&mut self, _: GetMachineURNParams<>, _: GetMachineURNResults<>) -> ::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_machine_list(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
|
||||||
1 => server.get_machine(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)),
|
|
||||||
2 => server.get_machine_u_r_n(::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 = 0xf8a1_a0ce_79e3_a4ae;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod get_machine_list_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 = 0xae72_5a44_381c_cb81;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod get_machine_list_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_machine_list(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,crate::schema::machine_capnp::machine::Owned>> {
|
|
||||||
::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
}
|
|
||||||
pub fn has_machine_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_machine_list(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,crate::schema::machine_capnp::machine::Owned>> {
|
|
||||||
::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn set_machine_list(&mut self, value: ::capnp::struct_list::Reader<'a,crate::schema::machine_capnp::machine::Owned>) -> ::capnp::Result<()> {
|
|
||||||
::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_machine_list(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::schema::machine_capnp::machine::Owned> {
|
|
||||||
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
|
|
||||||
}
|
|
||||||
pub fn has_machine_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 = 0x9964_3fc1_40c0_b2c1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod get_machine_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_id(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_id(&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_id(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_id(&mut self, value: ::capnp::text::Reader<'_>) {
|
|
||||||
self.builder.get_pointer_field(0).set_text(value);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_id(self, size: u32) -> ::capnp::text::Builder<'a> {
|
|
||||||
self.builder.get_pointer_field(0).init_text(size)
|
|
||||||
}
|
|
||||||
pub fn has_id(&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 = 0xe315_5a06_09f4_4bed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod get_machine_u_r_n_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_urn(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_urn(&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_urn(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_urn(&mut self, value: ::capnp::text::Reader<'_>) {
|
|
||||||
self.builder.get_pointer_field(0).set_text(value);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn init_urn(self, size: u32) -> ::capnp::text::Builder<'a> {
|
|
||||||
self.builder.get_pointer_field(0).init_text(size)
|
|
||||||
}
|
|
||||||
pub fn has_urn(&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 = 0xeb9d_c2e7_8963_51aa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,572 +0,0 @@
|
|||||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
|
||||||
// DO NOT EDIT.
|
|
||||||
// source: permissionsystem.capnp
|
|
||||||
|
|
||||||
|
|
||||||
pub mod permission_system {
|
|
||||||
#[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)}
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_manage(self) -> ::capnp::Result<crate::schema::permissionsystem_capnp::permission_system::manage::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_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);
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_manage(self) -> ::capnp::Result<crate::schema::permissionsystem_capnp::permission_system::manage::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_manage(&mut self, value: crate::schema::permissionsystem_capnp::permission_system::manage::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_info(&self) -> crate::schema::permissionsystem_capnp::permission_system::info::Client {
|
|
||||||
::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(0).as_cap())
|
|
||||||
}
|
|
||||||
pub fn get_manage(&self) -> crate::schema::permissionsystem_capnp::permission_system::manage::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 = 0xcafb_f059_d7a0_0c3b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pub mod info {
|
|
||||||
#![allow(unused_variables)]
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
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_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 trait Server<> {
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
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_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 = 0xdff7_7e8f_ec2d_a43b;
|
|
||||||
}
|
|
||||||
|
|
||||||
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>; }
|
|
||||||
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 = 0xd5b5_fb0f_7259_c89b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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>; }
|
|
||||||
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_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_role_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_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_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_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_role_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 = 0xc506_980d_e52d_5ab2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
|
||||||
// DO NOT EDIT.
|
|
||||||
// source: programming_language/csharp.capnp
|
|
||||||
|
|
||||||
|
|
||||||
#[repr(u16)]
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
||||||
pub enum TypeVisibility {
|
|
||||||
Public = 0,
|
|
||||||
Internal = 1,
|
|
||||||
}
|
|
||||||
impl ::capnp::traits::FromU16 for TypeVisibility {
|
|
||||||
#[inline]
|
|
||||||
fn from_u16(value: u16) -> ::core::result::Result<TypeVisibility, ::capnp::NotInSchema> {
|
|
||||||
match value {
|
|
||||||
0 => ::core::result::Result::Ok(TypeVisibility::Public),
|
|
||||||
1 => ::core::result::Result::Ok(TypeVisibility::Internal),
|
|
||||||
n => ::core::result::Result::Err(::capnp::NotInSchema(n)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl ::capnp::traits::ToU16 for TypeVisibility {
|
|
||||||
#[inline]
|
|
||||||
fn to_u16(self) -> u16 { self as u16 }
|
|
||||||
}
|
|
||||||
impl ::capnp::traits::HasTypeId for TypeVisibility {
|
|
||||||
#[inline]
|
|
||||||
fn type_id() -> u64 { 0xeb0d_8316_68c6_eda5u64 }
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
|
||||||
// DO NOT EDIT.
|
|
||||||
// source: programming_language/rust.capnp
|
|
||||||
|
|
@ -1,139 +0,0 @@
|
|||||||
// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
|
|
||||||
// DO NOT EDIT.
|
|
||||||
// source: role.capnp
|
|
||||||
|
|
||||||
|
|
||||||
pub mod role {
|
|
||||||
#[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 = 0xd53a_c00e_04e0_4b2d;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,186 +0,0 @@
|
|||||||
// @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
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user