// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler. // DO NOT EDIT. // source: users.capnp pub mod users { #![allow(unused_variables)] pub type WhoamiParams<> = ::capnp::capability::Params; pub type WhoamiResults<> = ::capnp::capability::Results; pub type ManageParams<> = ::capnp::capability::Params; pub type ManageResults<> = ::capnp::capability::Results; pub struct Client { pub client: ::capnp::capability::Client, } impl ::capnp::capability::FromClientHook for Client { fn new(hook: Box) -> 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> { ::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> { ::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 whoami_request(&self) -> ::capnp::capability::Request { self.client.new_call(_private::TYPE_ID, 0, None) } pub fn manage_request(&self) -> ::capnp::capability::Request { self.client.new_call(_private::TYPE_ID, 1, None) } } pub trait Server<> { fn whoami(&mut self, _: WhoamiParams<>, _: WhoamiResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) } fn manage(&mut self, _: ManageParams<>, _: ManageResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) } } pub struct ServerDispatch<_T,> { 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.whoami(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)), 1 => server.manage(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)), _ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) } } } } pub mod _private { pub const TYPE_ID: u64 = 0xf7f9_c772_e412_be16; } pub mod manage { #![allow(unused_variables)] pub type ListParams<> = ::capnp::capability::Params; pub type ListResults<> = ::capnp::capability::Results; pub type AddUserParams<> = ::capnp::capability::Params; pub type AddUserResults<> = ::capnp::capability::Results; pub type RemoveUserParams<> = ::capnp::capability::Params; pub type RemoveUserResults<> = ::capnp::capability::Results; pub struct Client { pub client: ::capnp::capability::Client, } impl ::capnp::capability::FromClientHook for Client { fn new(hook: Box) -> 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> { ::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> { ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(builder.get_capability()?)) } } impl <> ::capnp::traits::SetPointerBuilder for Client<> { fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Client<>, _canonicalize: bool) -> ::capnp::Result<()> { pointer.set_capability(from.client.hook); ::core::result::Result::Ok(()) } } impl ::capnp::traits::HasTypeId for Client { #[inline] fn type_id() -> u64 { _private::TYPE_ID } } impl Clone for Client { fn clone(&self) -> Client { Client { client: ::capnp::capability::Client::new(self.client.hook.add_ref()), } } } impl Client { pub fn list_request(&self) -> ::capnp::capability::Request { self.client.new_call(_private::TYPE_ID, 0, None) } pub fn add_user_request(&self) -> ::capnp::capability::Request { self.client.new_call(_private::TYPE_ID, 1, None) } pub fn remove_user_request(&self) -> ::capnp::capability::Request { self.client.new_call(_private::TYPE_ID, 2, None) } } pub trait Server<> { fn list(&mut self, _: ListParams<>, _: ListResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) } fn add_user(&mut self, _: AddUserParams<>, _: AddUserResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) } fn remove_user(&mut self, _: RemoveUserParams<>, _: RemoveUserResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method not implemented".to_string())) } } pub struct ServerDispatch<_T,> { pub server: _T, } impl <_S: Server + 'static, > ::capnp::capability::FromServer<_S> for Client { type Dispatch = ServerDispatch<_S, >; fn from_server(s: _S) -> ServerDispatch<_S, > { ServerDispatch { server: s, } } } impl <_T: Server> ::core::ops::Deref for ServerDispatch<_T> { type Target = _T; fn deref(&self) -> &_T { &self.server} } impl <_T: Server> ::core::ops::DerefMut for ServerDispatch<_T> { fn deref_mut(&mut self) -> &mut _T { &mut self.server} } impl <_T: Server> ::capnp::capability::Server for ServerDispatch<_T> { fn dispatch_call(&mut self, interface_id: u64, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> { match interface_id { _private::TYPE_ID => ServerDispatch::<_T, >::dispatch_call_internal(&mut self.server, method_id, params, results), _ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) } } } } impl <_T :Server> ServerDispatch<_T> { pub fn dispatch_call_internal(server: &mut _T, method_id: u16, params: ::capnp::capability::Params<::capnp::any_pointer::Owned>, results: ::capnp::capability::Results<::capnp::any_pointer::Owned>) -> ::capnp::capability::Promise<(), ::capnp::Error> { match method_id { 0 => server.list(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)), 1 => server.add_user(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)), 2 => server.remove_user(::capnp::private::capability::internal_get_typed_params(params), ::capnp::private::capability::internal_get_typed_results(results)), _ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())) } } } } pub mod _private { pub const TYPE_ID: u64 = 0xf126_12f0_bd1f_52a1; } pub mod 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> { ::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> { ::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 = 0xe764_fc82_cdcb_2165; } } pub mod 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> { ::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_users(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,crate::schema::user_capnp::user::Owned>> { ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None) } pub fn has_users(&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> { ::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_users(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,crate::schema::user_capnp::user::Owned>> { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] pub fn set_users(&mut self, value: ::capnp::struct_list::Reader<'a,crate::schema::user_capnp::user::Owned>) -> ::capnp::Result<()> { ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.get_pointer_field(0), value, false) } #[inline] pub fn init_users(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::schema::user_capnp::user::Owned> { ::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size) } pub fn has_users(&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 = 0xb7a0_f9ef_a70f_e3a0; } } pub mod add_user_params { #[derive(Copy, Clone)] pub struct Owned(()); impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; } impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; } impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; } #[derive(Clone, Copy)] pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> } impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> { #[inline] fn type_id() -> u64 { _private::TYPE_ID } } impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> { fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> { Reader { reader, } } } impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> { fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { ::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?)) } } impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { self.reader } } impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> { fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) { self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table)) } } impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { Reader { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.reader.total_size() } #[inline] pub fn get_username(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None) } pub fn has_username(&self) -> bool { !self.reader.get_pointer_field(0).is_null() } #[inline] pub fn get_password(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None) } pub fn has_password(&self) -> bool { !self.reader.get_pointer_field(1).is_null() } } pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> } impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> { #[inline] fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE } } impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> { #[inline] fn type_id() -> u64 { _private::TYPE_ID } } impl <'a,> ::capnp::traits::FromStructBuilder<'a> for Builder<'a,> { fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, > { Builder { builder, } } } impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> { fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) { self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table)) } } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { ::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE)) } fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { ::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?)) } } impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { pub fn into_reader(self) -> Reader<'a,> { ::capnp::traits::FromStructReader::new(self.builder.into_reader()) } pub fn reborrow(&mut self) -> Builder<'_,> { Builder { .. *self } } pub fn reborrow_as_reader(&self) -> Reader<'_,> { ::capnp::traits::FromStructReader::new(self.builder.into_reader()) } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.builder.into_reader().total_size() } #[inline] pub fn get_username(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] pub fn set_username(&mut self, value: ::capnp::text::Reader<'_>) { self.builder.get_pointer_field(0).set_text(value); } #[inline] pub fn init_username(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(0).init_text(size) } pub fn has_username(&self) -> bool { !self.builder.get_pointer_field(0).is_null() } #[inline] pub fn get_password(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) } #[inline] pub fn set_password(&mut self, value: ::capnp::text::Reader<'_>) { self.builder.get_pointer_field(1).set_text(value); } #[inline] pub fn init_password(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(1).init_text(size) } pub fn has_password(&self) -> bool { !self.builder.get_pointer_field(1).is_null() } } pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline } impl ::capnp::capability::FromTypelessPipeline for Pipeline { fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline { Pipeline { _typeless: typeless, } } } impl Pipeline { } mod _private { use capnp::private::layout; pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 2 }; pub const TYPE_ID: u64 = 0xf081_0d1b_aa9d_d883; } } pub mod remove_user_results { #[derive(Copy, Clone)] pub struct Owned(()); impl <'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; } impl <'a> ::capnp::traits::OwnedStruct<'a> for Owned { type Reader = Reader<'a>; type Builder = Builder<'a>; } impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; } #[derive(Clone, Copy)] pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> } impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> { #[inline] fn type_id() -> u64 { _private::TYPE_ID } } impl <'a,> ::capnp::traits::FromStructReader<'a> for Reader<'a,> { fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,> { Reader { reader, } } } impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> { fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { ::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> { ::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(_private::STRUCT_SIZE, default)?)) } } impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,>, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { pub fn into_reader(self) -> Reader<'a,> { ::capnp::traits::FromStructReader::new(self.builder.into_reader()) } pub fn reborrow(&mut self) -> Builder<'_,> { Builder { .. *self } } pub fn reborrow_as_reader(&self) -> Reader<'_,> { ::capnp::traits::FromStructReader::new(self.builder.into_reader()) } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.builder.into_reader().total_size() } } pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline } impl ::capnp::capability::FromTypelessPipeline for Pipeline { fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline { Pipeline { _typeless: typeless, } } } impl Pipeline { } mod _private { use capnp::private::layout; pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 0 }; pub const TYPE_ID: u64 = 0xffbb_0a58_d5e6_cf7b; } } } pub mod whoami_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> { ::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> { ::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 = 0xdd6d_d116_c4d2_35b1; } } pub mod manage_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> { ::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> { ::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 = 0xaaad_50f7_1955_4151; } } pub mod manage_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> { ::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_manage(self) -> ::capnp::Result { 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> { ::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_manage(self) -> ::capnp::Result { match self.builder.get_pointer_field(0).get_capability() { ::core::result::Result::Ok(c) => ::core::result::Result::Ok(::capnp::capability::FromClientHook::new(c)), ::core::result::Result::Err(e) => ::core::result::Result::Err(e)} } #[inline] pub fn set_manage(&mut self, value: crate::schema::users_capnp::users::manage::Client) { 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_manage(&self) -> crate::schema::users_capnp::users::manage::Client { ::capnp::capability::FromClientHook::new(self._typeless.get_pointer_field(0).as_cap()) } } mod _private { use capnp::private::layout; pub const STRUCT_SIZE: layout::StructSize = layout::StructSize { data: 0, pointers: 1 }; pub const TYPE_ID: u64 = 0xb5f9_352e_60d8_09ea; } } }