From dd4e923f75c1a3f05908dae79af65357ef2aeec2 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Tue, 22 Nov 2022 21:03:11 +0000 Subject: [PATCH] use 'Self' keyword to refer to own type --- async-byte-channel/src/lib.rs | 4 +- benchmark/benchmark.rs | 18 +- benchmark/common.rs | 4 +- capnp-futures/src/serialize.rs | 8 +- capnp-futures/src/serialize_packed.rs | 4 +- capnp-futures/src/write_queue.rs | 4 +- capnp-rpc/examples/calculator/server.rs | 11 +- capnp-rpc/examples/pubsub/server.rs | 12 +- capnp-rpc/src/broken.rs | 16 +- capnp-rpc/src/lib.rs | 15 +- capnp-rpc/src/local.rs | 48 +- capnp-rpc/src/queued.rs | 18 +- capnp-rpc/src/rpc.rs | 228 ++++----- capnp-rpc/src/rpc_capnp.rs | 360 +++++++------- capnp-rpc/src/rpc_twoparty_capnp.rs | 108 ++-- capnp-rpc/src/sender_queue.rs | 4 +- capnp-rpc/src/task_set.rs | 12 +- capnp-rpc/src/twoparty.rs | 16 +- capnp-rpc/test/impls.rs | 20 +- capnp/src/private/layout.rs | 6 +- capnp/src/private/mask.rs | 8 +- capnp/src/private/primitive.rs | 12 +- capnpc/src/codegen.rs | 35 +- capnpc/src/schema_capnp.rs | 630 ++++++++++++------------ 24 files changed, 784 insertions(+), 817 deletions(-) diff --git a/async-byte-channel/src/lib.rs b/async-byte-channel/src/lib.rs index 97137ba64..f591ab4bd 100644 --- a/async-byte-channel/src/lib.rs +++ b/async-byte-channel/src/lib.rs @@ -18,8 +18,8 @@ struct Inner { } impl Inner { - fn new() -> Inner { - Inner { + fn new() -> Self { + Self { buffer: vec![0; 8096], write_cursor: 0, read_cursor: 0, diff --git a/benchmark/benchmark.rs b/benchmark/benchmark.rs index eb26b04de..f77765950 100644 --- a/benchmark/benchmark.rs +++ b/benchmark/benchmark.rs @@ -162,8 +162,8 @@ pub struct UseScratch { } impl UseScratch { - pub fn new() -> UseScratch { - UseScratch { + pub fn new() -> Self { + Self { buffer1: capnp::Word::allocate_zeroed_vec(SCRATCH_SIZE), buffer2: capnp::Word::allocate_zeroed_vec(SCRATCH_SIZE), } @@ -174,7 +174,7 @@ impl<'a> Scratch<'a> for UseScratch { type Allocator = message::ScratchSpaceHeapAllocator<'a>; fn get_allocators(&'a mut self) -> (Self::Allocator, Self::Allocator) { - let UseScratch { buffer1, buffer2 } = self; + let Self { buffer1, buffer2 } = self; ( message::ScratchSpaceHeapAllocator::new(capnp::Word::words_to_bytes_mut(buffer1)), message::ScratchSpaceHeapAllocator::new(capnp::Word::words_to_bytes_mut(buffer2)), @@ -374,13 +374,13 @@ pub enum Mode { } impl Mode { - pub fn parse(s: &str) -> ::capnp::Result { + pub fn parse(s: &str) -> ::capnp::Result { match s { - "object" => Ok(Mode::Object), - "bytes" => Ok(Mode::Bytes), - "client" => Ok(Mode::Client), - "server" => Ok(Mode::Server), - "pipe" => Ok(Mode::Pipe), + "object" => Ok(Self::Object), + "bytes" => Ok(Self::Bytes), + "client" => Ok(Self::Client), + "server" => Ok(Self::Server), + "pipe" => Ok(Self::Pipe), s => Err(::capnp::Error::failed(format!("unrecognized mode: {}", s))), } } diff --git a/benchmark/common.rs b/benchmark/common.rs index 58ea8fb4d..8ee04c0db 100644 --- a/benchmark/common.rs +++ b/benchmark/common.rs @@ -30,8 +30,8 @@ pub struct FastRand { } impl FastRand { - pub fn new() -> FastRand { - FastRand { + pub fn new() -> Self { + Self { x: 0x1d2acd47, y: 0x58ca3e14, z: 0xf563f232, diff --git a/capnp-futures/src/serialize.rs b/capnp-futures/src/serialize.rs index 27e05e89c..09640ab52 100644 --- a/capnp-futures/src/serialize.rs +++ b/capnp-futures/src/serialize.rs @@ -552,8 +552,8 @@ pub mod test { where R: Read, { - pub(crate) fn new(read: R, blocking_period: usize) -> BlockingRead { - BlockingRead { + pub(crate) fn new(read: R, blocking_period: usize) -> Self { + Self { read, blocking_period, idx: 0, @@ -605,8 +605,8 @@ pub mod test { where W: Write, { - pub(crate) fn new(writer: W, blocking_period: usize) -> BlockingWrite { - BlockingWrite { + pub(crate) fn new(writer: W, blocking_period: usize) -> Self { + Self { writer, blocking_period, idx: 0, diff --git a/capnp-futures/src/serialize_packed.rs b/capnp-futures/src/serialize_packed.rs index 94bb25193..c79e3da0f 100644 --- a/capnp-futures/src/serialize_packed.rs +++ b/capnp-futures/src/serialize_packed.rs @@ -85,7 +85,7 @@ where cx: &mut std::task::Context<'_>, outbuf: &mut [u8], ) -> Poll> { - let PackedRead { + let Self { stage, inner, buf, @@ -316,7 +316,7 @@ where mut inbuf: &[u8], ) -> Poll> { let mut inbuf_bytes_consumed: usize = 0; - let PackedWrite { + let Self { stage, inner, buf, diff --git a/capnp-futures/src/write_queue.rs b/capnp-futures/src/write_queue.rs index ab5e919e0..d56060350 100644 --- a/capnp-futures/src/write_queue.rs +++ b/capnp-futures/src/write_queue.rs @@ -45,8 +45,8 @@ impl Clone for Sender where M: AsOutputSegments, { - fn clone(&self) -> Sender { - Sender { + fn clone(&self) -> Self { + Self { sender: self.sender.clone(), } } diff --git a/capnp-rpc/examples/calculator/server.rs b/capnp-rpc/examples/calculator/server.rs index 9c23efd3b..04b300bde 100644 --- a/capnp-rpc/examples/calculator/server.rs +++ b/capnp-rpc/examples/calculator/server.rs @@ -35,8 +35,8 @@ struct ValueImpl { } impl ValueImpl { - fn new(value: f64) -> ValueImpl { - ValueImpl { value: value } + fn new(value: f64) -> Self { + Self { value: value } } } @@ -96,11 +96,8 @@ struct FunctionImpl { } impl FunctionImpl { - fn new( - param_count: u32, - body: calculator::expression::Reader, - ) -> ::capnp::Result { - let mut result = FunctionImpl { + fn new(param_count: u32, body: calculator::expression::Reader) -> ::capnp::Result { + let mut result = Self { param_count: param_count, body: ::capnp_rpc::ImbuedMessageBuilder::new(::capnp::message::HeapAllocator::new()), }; diff --git a/capnp-rpc/examples/pubsub/server.rs b/capnp-rpc/examples/pubsub/server.rs index 9f65e4dc1..229b06f1e 100644 --- a/capnp-rpc/examples/pubsub/server.rs +++ b/capnp-rpc/examples/pubsub/server.rs @@ -40,8 +40,8 @@ struct SubscriberMap { } impl SubscriberMap { - fn new() -> SubscriberMap { - SubscriberMap { + fn new() -> Self { + Self { subscribers: HashMap::new(), } } @@ -53,8 +53,8 @@ struct SubscriptionImpl { } impl SubscriptionImpl { - fn new(id: u64, subscribers: Rc>) -> SubscriptionImpl { - SubscriptionImpl { + fn new(id: u64, subscribers: Rc>) -> Self { + Self { id: id, subscribers: subscribers, } @@ -76,10 +76,10 @@ struct PublisherImpl { } impl PublisherImpl { - pub fn new() -> (PublisherImpl, Rc>) { + pub fn new() -> (Self, Rc>) { let subscribers = Rc::new(RefCell::new(SubscriberMap::new())); ( - PublisherImpl { + Self { next_id: 0, subscribers: subscribers.clone(), }, diff --git a/capnp-rpc/src/broken.rs b/capnp-rpc/src/broken.rs index 01100981b..980ad4868 100644 --- a/capnp-rpc/src/broken.rs +++ b/capnp-rpc/src/broken.rs @@ -35,14 +35,14 @@ pub struct Pipeline { } impl Pipeline { - pub fn new(error: Error) -> Pipeline { - Pipeline { error } + pub fn new(error: Error) -> Self { + Self { error } } } impl PipelineHook for Pipeline { fn add_ref(&self) -> Box { - Box::new(Pipeline::new(self.error.clone())) + Box::new(Self::new(self.error.clone())) } fn get_pipelined_cap(&self, _ops: &[PipelineOp]) -> Box { new_cap(self.error.clone()) @@ -56,8 +56,8 @@ pub struct Request { } impl Request { - pub fn new(error: Error, _size_hint: Option<::capnp::MessageSize>) -> Request { - Request { + pub fn new(error: Error, _size_hint: Option<::capnp::MessageSize>) -> Self { + Self { error, message: ::capnp::message::Builder::new_default(), cap_table: Vec::new(), @@ -97,8 +97,8 @@ pub struct Client { } impl Client { - pub fn new(error: Error, resolved: bool, brand: usize) -> Client { - Client { + pub fn new(error: Error, resolved: bool, brand: usize) -> Self { + Self { inner: Rc::new(ClientInner { error, _resolved: resolved, @@ -110,7 +110,7 @@ impl Client { impl ClientHook for Client { fn add_ref(&self) -> Box { - Box::new(Client { + Box::new(Self { inner: self.inner.clone(), }) } diff --git a/capnp-rpc/src/lib.rs b/capnp-rpc/src/lib.rs index 9d5b56e4a..e63500e7d 100644 --- a/capnp-rpc/src/lib.rs +++ b/capnp-rpc/src/lib.rs @@ -183,7 +183,7 @@ impl RpcSystem { pub fn new( mut network: Box>, bootstrap: Option<::capnp::capability::Client>, - ) -> RpcSystem { + ) -> Self { let bootstrap_cap = match bootstrap { Some(cap) => cap.hook, None => broken::new_cap(Error::failed("no bootstrap capability".to_string())), @@ -208,7 +208,7 @@ impl RpcSystem { Promise::ok(()) })); - let mut result = RpcSystem { + let mut result = Self { network, bootstrap_cap, connection_state: Rc::new(RefCell::new(None)), @@ -233,7 +233,7 @@ impl RpcSystem { return T::new(self.bootstrap_cap.clone()); } }; - let connection_state = RpcSystem::get_connection_state( + let connection_state = Self::get_connection_state( &self.connection_state, self.bootstrap_cap.clone(), connection, @@ -250,12 +250,7 @@ impl RpcSystem { let bootstrap_cap = self.bootstrap_cap.clone(); let handle = self.handle.clone(); Promise::from_future(self.network.accept().map_ok(move |connection| { - RpcSystem::get_connection_state( - &connection_state_ref, - bootstrap_cap, - connection, - handle, - ); + Self::get_connection_state(&connection_state_ref, bootstrap_cap, connection, handle); })) } @@ -421,7 +416,7 @@ where A: ::capnp::message::Allocator, { pub fn new(allocator: A) -> Self { - ImbuedMessageBuilder { + Self { builder: ::capnp::message::Builder::new(allocator), cap_table: Vec::new(), } diff --git a/capnp-rpc/src/local.rs b/capnp-rpc/src/local.rs index 107ba306f..0da36f7bc 100644 --- a/capnp-rpc/src/local.rs +++ b/capnp-rpc/src/local.rs @@ -39,7 +39,7 @@ pub trait ResultsDoneHook { } impl Clone for Box { - fn clone(&self) -> Box { + fn clone(&self) -> Self { self.add_ref() } } @@ -49,8 +49,8 @@ pub struct Response { } impl Response { - fn new(results: Box) -> Response { - Response { results } + fn new(results: Box) -> Self { + Self { results } } } @@ -69,8 +69,8 @@ impl Params { fn new( request: message::Builder, cap_table: Vec>>, - ) -> Params { - Params { request, cap_table } + ) -> Self { + Self { request, cap_table } } } @@ -89,8 +89,8 @@ struct Results { } impl Results { - fn new(fulfiller: oneshot::Sender>) -> Results { - Results { + fn new(fulfiller: oneshot::Sender>) -> Self { + Self { message: Some(::capnp::message::Builder::new_default()), cap_table: Vec::new(), results_done_fulfiller: Some(fulfiller), @@ -114,7 +114,7 @@ impl Drop for Results { impl ResultsHook for Results { fn get(&mut self) -> ::capnp::Result { match *self { - Results { + Self { message: Some(ref mut message), ref mut cap_table, .. @@ -156,8 +156,8 @@ impl ResultsDone { fn new( message: message::Builder, cap_table: Vec>>, - ) -> ResultsDone { - ResultsDone { + ) -> Self { + Self { inner: Rc::new(ResultsDoneInner { message, cap_table }), } } @@ -165,7 +165,7 @@ impl ResultsDone { impl ResultsDoneHook for ResultsDone { fn add_ref(&self) -> Box { - Box::new(ResultsDone { + Box::new(Self { inner: self.inner.clone(), }) } @@ -190,8 +190,8 @@ impl Request { method_id: u16, _size_hint: Option<::capnp::MessageSize>, client: Box, - ) -> Request { - Request { + ) -> Self { + Self { message: message::Builder::new_default(), cap_table: Vec::new(), interface_id, @@ -212,7 +212,7 @@ impl RequestHook for Request { } fn send(self: Box) -> capability::RemotePromise { let tmp = *self; - let Request { + let Self { message, cap_table, interface_id, @@ -265,16 +265,16 @@ pub struct Pipeline { } impl Pipeline { - pub fn new(results: Box) -> Pipeline { - Pipeline { + pub fn new(results: Box) -> Self { + Self { inner: Rc::new(RefCell::new(PipelineInner { results })), } } } impl Clone for Pipeline { - fn clone(&self) -> Pipeline { - Pipeline { + fn clone(&self) -> Self { + Self { inner: self.inner.clone(), } } @@ -310,14 +310,14 @@ impl Client where S: capability::Server, { - pub fn new(server: S) -> Client { - Client { + pub fn new(server: S) -> Self { + Self { inner: Rc::new(RefCell::new(server)), } } - pub fn from_rc(inner: Rc>) -> Client { - Client { inner } + pub fn from_rc(inner: Rc>) -> Self { + Self { inner } } } @@ -325,8 +325,8 @@ impl Clone for Client where S: capability::Server, { - fn clone(&self) -> Client { - Client { + fn clone(&self) -> Self { + Self { inner: self.inner.clone(), } } diff --git a/capnp-rpc/src/queued.rs b/capnp-rpc/src/queued.rs index c90a18467..40322f352 100644 --- a/capnp-rpc/src/queued.rs +++ b/capnp-rpc/src/queued.rs @@ -43,7 +43,7 @@ pub struct PipelineInner { } impl PipelineInner { - fn resolve(this: &Rc>, result: Result, Error>) { + fn resolve(this: &Rc>, result: Result, Error>) { assert!(this.borrow().redirect.is_none()); let pipeline = match result { Ok(pipeline_hook) => pipeline_hook, @@ -98,7 +98,7 @@ pub struct Pipeline { } impl Pipeline { - pub fn new() -> (PipelineInnerSender, Pipeline) { + pub fn new() -> (PipelineInnerSender, Self) { let inner = Rc::new(RefCell::new(PipelineInner { redirect: None, promise_to_drive: Promise::ok(()).shared(), @@ -109,7 +109,7 @@ impl Pipeline { PipelineInnerSender { inner: Some(Rc::downgrade(&inner)), }, - Pipeline { inner }, + Self { inner }, ) } @@ -127,8 +127,8 @@ impl Pipeline { } impl Clone for Pipeline { - fn clone(&self) -> Pipeline { - Pipeline { + fn clone(&self) -> Self { + Self { inner: self.inner.clone(), } } @@ -185,7 +185,7 @@ pub struct ClientInner { } impl ClientInner { - pub fn resolve(state: &Rc>, result: Result, Error>) { + pub fn resolve(state: &Rc>, result: Result, Error>) { assert!(state.borrow().redirect.is_none()); let client = match result { Ok(clienthook) => clienthook, @@ -211,7 +211,7 @@ pub struct Client { } impl Client { - pub fn new(pipeline_inner: Option>>) -> Client { + pub fn new(pipeline_inner: Option>>) -> Self { let inner = Rc::new(RefCell::new(ClientInner { promise_to_drive: None, pipeline_inner, @@ -219,7 +219,7 @@ impl Client { call_forwarding_queue: SenderQueue::new(), client_resolution_queue: SenderQueue::new(), })); - Client { inner } + Self { inner } } pub fn drive(&mut self, promise: F) @@ -233,7 +233,7 @@ impl Client { impl ClientHook for Client { fn add_ref(&self) -> Box { - Box::new(Client { + Box::new(Self { inner: self.inner.clone(), }) } diff --git a/capnp-rpc/src/rpc.rs b/capnp-rpc/src/rpc.rs index 0bf3ddc47..ace3306da 100644 --- a/capnp-rpc/src/rpc.rs +++ b/capnp-rpc/src/rpc.rs @@ -59,8 +59,8 @@ pub struct ImportTable { } impl ImportTable { - pub fn new() -> ImportTable { - ImportTable { + pub fn new() -> Self { + Self { slots: HashMap::new(), } } @@ -99,8 +99,8 @@ where } impl ExportTable { - pub fn new() -> ExportTable { - ExportTable { + pub fn new() -> Self { + Self { slots: Vec::new(), free_ids: BinaryHeap::new(), } @@ -158,8 +158,8 @@ where } impl Question { - fn new() -> Question { - Question { + fn new() -> Self { + Self { is_awaiting_return: true, param_exports: Vec::new(), is_tail_call: false, @@ -184,8 +184,8 @@ impl QuestionRef { state: Rc>, id: QuestionId, fulfiller: oneshot::Sender, Error>>, - ) -> QuestionRef { - QuestionRef { + ) -> Self { + Self { connection_state: state, id, fulfiller: Some(fulfiller), @@ -267,8 +267,8 @@ where } impl Answer { - fn new() -> Answer { - Answer { + fn new() -> Self { + Self { active: false, return_has_been_sent: false, pipeline: None, @@ -290,8 +290,8 @@ pub struct Export { } impl Export { - fn new(client_hook: Box) -> Export { - Export { + fn new(client_hook: Box) -> Self { + Self { refcount: 1, client_hook, resolve_op: Promise::err(Error::failed("no resolve op".to_string())), @@ -316,8 +316,8 @@ where } impl Import { - fn new() -> Import { - Import { + fn new() -> Self { + Self { import_client: None, app_client: None, promise_client_to_resolve: None, @@ -330,8 +330,8 @@ struct Embargo { } impl Embargo { - fn new(fulfiller: oneshot::Sender>) -> Embargo { - Embargo { + fn new(fulfiller: oneshot::Sender>) -> Self { + Self { fulfiller: Some(fulfiller), } } @@ -391,8 +391,8 @@ where } impl ConnectionErrorHandler { - fn new(weak_state: Weak>) -> ConnectionErrorHandler { - ConnectionErrorHandler { weak_state } + fn new(weak_state: Weak>) -> Self { + Self { weak_state } } } @@ -430,8 +430,8 @@ impl ConnectionState { bootstrap_cap: Box, connection: Box>, disconnect_fulfiller: oneshot::Sender>, - ) -> (TaskSet, Rc>) { - let state = Rc::new(ConnectionState { + ) -> (TaskSet, Rc) { + let state = Rc::new(Self { bootstrap_cap, exports: RefCell::new(ExportTable::new()), questions: RefCell::new(ExportTable::new()), @@ -447,7 +447,7 @@ impl ConnectionState { let (mut handle, tasks) = TaskSet::new(Box::new(ConnectionErrorHandler::new(Rc::downgrade(&state)))); - handle.add(ConnectionState::message_loop(Rc::downgrade(&state))); + handle.add(Self::message_loop(Rc::downgrade(&state))); *state.tasks.borrow_mut() = Some(handle); (tasks, state) } @@ -605,7 +605,7 @@ impl ConnectionState { } } - pub fn bootstrap(state: &Rc>) -> Box { + pub fn bootstrap(state: &Rc) -> Box { let question_id = state.questions.borrow_mut().push(Question::new()); let (fulfiller, promise) = oneshot::channel(); @@ -643,7 +643,7 @@ impl ConnectionState { pipeline.get_pipelined_cap_move(Vec::new()) } - fn message_loop(weak_state: Weak>) -> Promise<(), capnp::Error> { + fn message_loop(weak_state: Weak) -> Promise<(), capnp::Error> { let state = match weak_state.upgrade() { None => { return Promise::err(Error::disconnected( @@ -661,11 +661,11 @@ impl ConnectionState { Promise::from_future(async move { match promise.await? { Some(m) => { - ConnectionState::handle_message(&weak_state, m)?; + Self::handle_message(&weak_state, m)?; weak_state .upgrade() .expect("message loop outlived connection state?") - .add_task(ConnectionState::message_loop(weak_state)); + .add_task(Self::message_loop(weak_state)); } None => { weak_state @@ -679,7 +679,7 @@ impl ConnectionState { } fn send_unimplemented( - connection_state: &Rc>, + connection_state: &Rc, message: &Box, ) -> capnp::Result<()> { let mut out_message = connection_state.new_outgoing_message(50)?; // XXX size hint @@ -692,7 +692,7 @@ impl ConnectionState { } fn handle_unimplemented( - connection_state: &Rc>, + connection_state: &Rc, message: message::Reader, ) -> capnp::Result<()> { match message.which()? { @@ -727,7 +727,7 @@ impl ConnectionState { } fn handle_bootstrap( - connection_state: &Rc>, + connection_state: &Rc, bootstrap: bootstrap::Reader, ) -> capnp::Result<()> { use ::capnp::traits::ImbueMut; @@ -757,7 +757,7 @@ impl ConnectionState { } assert_eq!(cap_table.len(), 1); - ConnectionState::write_descriptors(&connection_state, &cap_table, payload) + Self::write_descriptors(&connection_state, &cap_table, payload) }; let slots = &mut connection_state.answers.borrow_mut().slots; @@ -777,10 +777,7 @@ impl ConnectionState { Ok(()) } - fn handle_finish( - connection_state: &Rc>, - finish: finish::Reader, - ) -> capnp::Result<()> { + fn handle_finish(connection_state: &Rc, finish: finish::Reader) -> capnp::Result<()> { let mut exports_to_release = Vec::new(); let answer_id = finish.get_question_id(); @@ -825,7 +822,7 @@ impl ConnectionState { } fn handle_disembargo( - connection_state: &Rc>, + connection_state: &Rc, disembargo: disembargo::Reader, ) -> capnp::Result<()> { let context = disembargo.get_context(); @@ -896,7 +893,7 @@ impl ConnectionState { } fn handle_message( - weak_state: &Weak>, + weak_state: &Weak, message: Box, ) -> ::capnp::Result<()> { let connection_state = match weak_state.upgrade() { @@ -936,7 +933,7 @@ impl ConnectionState { call.get_interface_id(), call.get_method_id(), call.get_question_id(), - ConnectionState::receive_caps(&connection_state, payload.get_cap_table()?)?, + Self::receive_caps(&connection_state, payload.get_cap_table()?)?, redirect_results, ) }; @@ -1044,7 +1041,7 @@ impl ConnectionState { Some(ref question_ref) => { match ret.which()? { return_::Results(results) => { - let cap_table = ConnectionState::receive_caps( + let cap_table = Self::receive_caps( &connection_state, results?.get_cap_table()?, )?; @@ -1089,10 +1086,7 @@ impl ConnectionState { } return_::AcceptFromThirdParty(_) => { drop(questions); - ConnectionState::send_unimplemented( - &connection_state, - &message, - )?; + Self::send_unimplemented(&connection_state, &message)?; } } } @@ -1123,7 +1117,7 @@ impl ConnectionState { Ok(message::Resolve(resolve)) => { let resolve = resolve?; let replacement_or_error = match resolve.which()? { - resolve::Cap(c) => match ConnectionState::receive_cap(&connection_state, c?)? { + resolve::Cap(c) => match Self::receive_cap(&connection_state, c?)? { Some(cap) => Ok(cap), None => { return Err(Error::failed( @@ -1175,7 +1169,7 @@ impl ConnectionState { | Ok(message::ObsoleteSave(_)) | Ok(message::ObsoleteDelete(_)) | Err(::capnp::NotInSchema(_)) => { - ConnectionState::send_unimplemented(&connection_state, &message)?; + Self::send_unimplemented(&connection_state, &message)?; } } Ok(()) @@ -1322,7 +1316,7 @@ impl ConnectionState { /// to eventually resolve to the ClientHook produced by `promise`. This method waits for that /// resolve to happen and then sends the appropriate `Resolve` message to the peer. fn resolve_exported_promise( - state: &Rc>, + state: &Rc, export_id: ExportId, promise: Promise, Error>, ) -> Promise<(), Error> { @@ -1371,7 +1365,7 @@ impl ConnectionState { let root: message::Builder = message.get_body()?.get_as()?; let mut resolve = root.init_resolve(); resolve.set_promise_id(export_id); - let _export = ConnectionState::write_descriptor( + let _export = Self::write_descriptor( &connection_state, &resolution, resolve.init_cap(), @@ -1397,7 +1391,7 @@ impl ConnectionState { } fn write_descriptor( - state: &Rc>, + state: &Rc, cap: &Box, mut descriptor: cap_descriptor::Builder, ) -> ::capnp::Result> { @@ -1436,9 +1430,8 @@ impl ConnectionState { Some(wrapped) => { // This is a promise. Arrange for the `Resolve` message to be sent later. if let Some(exp) = state.exports.borrow_mut().find(export_id) { - exp.resolve_op = ConnectionState::resolve_exported_promise( - state, export_id, wrapped, - ); + exp.resolve_op = + Self::resolve_exported_promise(state, export_id, wrapped); } descriptor.set_sender_promise(export_id); } @@ -1452,7 +1445,7 @@ impl ConnectionState { } fn write_descriptors( - state: &Rc>, + state: &Rc, cap_table: &[Option>], payload: payload::Builder, ) -> Vec { @@ -1461,7 +1454,7 @@ impl ConnectionState { for idx in 0..cap_table.len() { match cap_table[idx] { Some(ref cap) => { - match ConnectionState::write_descriptor( + match Self::write_descriptor( state, cap, cap_table_builder.reborrow().get(idx as u32), @@ -1482,11 +1475,7 @@ impl ConnectionState { exports } - fn import( - state: &Rc>, - import_id: ImportId, - is_promise: bool, - ) -> Box { + fn import(state: &Rc, import_id: ImportId, is_promise: bool) -> Box { let connection_state = state.clone(); let import_client = { @@ -1562,16 +1551,16 @@ impl ConnectionState { } fn receive_cap( - state: &Rc>, + state: &Rc, descriptor: cap_descriptor::Reader, ) -> ::capnp::Result>> { match descriptor.which()? { cap_descriptor::None(()) => Ok(None), cap_descriptor::SenderHosted(sender_hosted) => { - Ok(Some(ConnectionState::import(&state, sender_hosted, false))) + Ok(Some(Self::import(&state, sender_hosted, false))) } cap_descriptor::SenderPromise(sender_promise) => { - Ok(Some(ConnectionState::import(&state, sender_promise, true))) + Ok(Some(Self::import(&state, sender_promise, true))) } cap_descriptor::ReceiverHosted(receiver_hosted) => { if let Some(exp) = state.exports.borrow_mut().find(receiver_hosted) { @@ -1610,12 +1599,12 @@ impl ConnectionState { } fn receive_caps( - state: &Rc>, + state: &Rc, cap_table: ::capnp::struct_list::Reader, ) -> ::capnp::Result>>> { let mut result = Vec::new(); for idx in 0..cap_table.len() { - result.push(ConnectionState::receive_cap(&state, cap_table.get(idx))?); + result.push(Self::receive_cap(&state, cap_table.get(idx))?); } Ok(result) } @@ -1637,14 +1626,12 @@ where } impl Disconnector { - pub fn new( - connection_state: Rc>>>>, - ) -> Disconnector { + pub fn new(connection_state: Rc>>>>) -> Self { let state = match *(connection_state.borrow()) { Some(_) => DisconnectorState::Connected, None => DisconnectorState::Disconnected, }; - Disconnector { + Self { connection_state, state, } @@ -1721,8 +1708,8 @@ impl Response { question_ref: Rc>>, message: Box, cap_table_array: Vec>>, - ) -> Response { - Response { + ) -> Self { + Self { variant: Rc::new(ResponseVariant::Rpc(ResponseState { _connection_state: connection_state, message, @@ -1731,16 +1718,16 @@ impl Response { })), } } - fn redirected(results_done: Box) -> Response { - Response { + fn redirected(results_done: Box) -> Self { + Self { variant: Rc::new(ResponseVariant::LocallyRedirected(results_done)), } } } impl Clone for Response { - fn clone(&self) -> Response { - Response { + fn clone(&self) -> Self { + Self { variant: self.variant.clone(), } } @@ -1800,9 +1787,9 @@ where connection_state: Rc>, _size_hint: Option<::capnp::MessageSize>, target: Client, - ) -> ::capnp::Result> { + ) -> ::capnp::Result { let message = connection_state.new_outgoing_message(100)?; - Ok(Request { + Ok(Self { connection_state, target, message, @@ -1886,7 +1873,7 @@ impl RequestHook for Request { } fn send(self: Box) -> ::capnp::capability::RemotePromise { let tmp = *self; - let Request { + let Self { connection_state, target, mut message, @@ -1920,7 +1907,7 @@ impl RequestHook for Request { } None => { let (question_ref, promise) = - Request::send_internal(&connection_state, message, &cap_table, false); + Self::send_internal(&connection_state, message, &cap_table, false); let forked_promise1 = promise.shared(); let forked_promise2 = forked_promise1.clone(); @@ -1949,7 +1936,7 @@ impl RequestHook for Request { } fn tail_send(self: Box) -> Option<(u32, Promise<(), Error>, Box)> { let tmp = *self; - let Request { + let Self { connection_state, target, mut message, @@ -1970,7 +1957,7 @@ impl RequestHook for Request { Some(_redirect) => { return None; } - None => Request::send_internal(&connection_state, message, &cap_table, true), + None => Self::send_internal(&connection_state, message, &cap_table, true), }; let promise = promise.map_ok(|_response| { @@ -2024,10 +2011,7 @@ impl PipelineState where VatId: 'static, { - fn resolve( - state: &Rc>>, - response: Result, Error>, - ) { + fn resolve(state: &Rc>, response: Result, Error>) { let to_resolve = { let tmp = state.borrow(); let r = tmp.promise_clients_to_resolve.borrow_mut().drain(); @@ -2071,7 +2055,7 @@ impl Pipeline { connection_state: &Rc>, question_ref: Rc>>, redirect_later: Option, ::capnp::Error>>, - ) -> Pipeline { + ) -> Self { let state = Rc::new(RefCell::new(PipelineState { variant: PipelineVariant::Waiting(question_ref), connection_state: connection_state.clone(), @@ -2103,7 +2087,7 @@ impl Pipeline { } None => {} } - Pipeline { state } + Self { state } } fn when_resolved(&self) -> Promise<(), Error> { @@ -2113,7 +2097,7 @@ impl Pipeline { fn never_done( connection_state: Rc>, question_ref: Rc>>, - ) -> Pipeline { + ) -> Self { let state = Rc::new(RefCell::new(PipelineState { variant: PipelineVariant::Waiting(question_ref), connection_state, @@ -2123,13 +2107,13 @@ impl Pipeline { resolution_waiters: crate::sender_queue::SenderQueue::new(), })); - Pipeline { state } + Self { state } } } impl PipelineHook for Pipeline { fn add_ref(&self) -> Box { - Box::new(Pipeline { + Box::new(Self { state: self.state.clone(), }) } @@ -2188,8 +2172,8 @@ impl Params { fn new( request: Box, cap_table: Vec>>, - ) -> Params { - Params { request, cap_table } + ) -> Self { + Self { request, cap_table } } } @@ -2284,8 +2268,8 @@ where redirect_results: bool, fulfiller: oneshot::Sender>, finish_received: Rc>, - ) -> Results { - Results { + ) -> Self { + Self { inner: Some(ResultsInner { variant: None, connection_state: connection_state.clone(), @@ -2435,9 +2419,8 @@ impl ResultsDone { Some(ResultsVariant::Rpc(mut message, cap_table)) => { match (finish_received.get(), call_status) { (true, _) => { - let hook = - Box::new(ResultsDone::rpc(Rc::new(message.take()), cap_table)) - as Box; + let hook = Box::new(Self::rpc(Rc::new(message.take()), cap_table)) + as Box; pipeline_sender .complete(Box::new(local::Pipeline::new(hook.clone()))); @@ -2485,8 +2468,8 @@ impl ResultsDone { let (_promise, m) = message.send(); connection_state.answer_has_sent_return(answer_id, exports); - let hook = Box::new(ResultsDone::rpc(m, cap_table)) - as Box; + let hook = + Box::new(Self::rpc(m, cap_table)) as Box; pipeline_sender .complete(Box::new(local::Pipeline::new(hook.clone()))); Ok(hook) @@ -2519,7 +2502,7 @@ impl ResultsDone { } } Some(ResultsVariant::LocallyRedirected(results_done, cap_table)) => { - let hook = Box::new(ResultsDone::redirected(results_done, cap_table)) + let hook = Box::new(Self::redirected(results_done, cap_table)) as Box; pipeline_sender .complete(Box::new(crate::local::Pipeline::new(hook.clone()))); @@ -2533,8 +2516,8 @@ impl ResultsDone { fn rpc( message: Rc<::capnp::message::Builder<::capnp::message::HeapAllocator>>, cap_table: Vec>>, - ) -> ResultsDone { - ResultsDone { + ) -> Self { + Self { inner: Rc::new(ResultsDoneVariant::Rpc(message, cap_table)), } } @@ -2542,8 +2525,8 @@ impl ResultsDone { fn redirected( message: ::capnp::message::Builder<::capnp::message::HeapAllocator>, cap_table: Vec>>, - ) -> ResultsDone { - ResultsDone { + ) -> Self { + Self { inner: Rc::new(ResultsDoneVariant::LocallyRedirected(message, cap_table)), } } @@ -2551,7 +2534,7 @@ impl ResultsDone { impl ResultsDoneHook for ResultsDone { fn add_ref(&self) -> Box { - Box::new(ResultsDone { + Box::new(Self { inner: self.inner.clone(), }) } @@ -2704,8 +2687,8 @@ where fn new( connection_state: &Rc>, import_id: ImportId, - ) -> Rc>> { - Rc::new(RefCell::new(ImportClient { + ) -> Rc> { + Rc::new(RefCell::new(Self { connection_state: connection_state.clone(), import_id, remote_ref_count: 0, @@ -2718,9 +2701,9 @@ where } impl From>>> for Client { - fn from(client: Rc>>) -> Client { + fn from(client: Rc>>) -> Self { let connection_state = client.borrow().connection_state.clone(); - Client::new(&connection_state, ClientVariant::Import(client)) + Self::new(&connection_state, ClientVariant::Import(client)) } } @@ -2742,8 +2725,8 @@ where connection_state: &Rc>, question_ref: Rc>>, ops: Vec, - ) -> Rc>> { - Rc::new(RefCell::new(PipelineClient { + ) -> Rc> { + Rc::new(RefCell::new(Self { connection_state: connection_state.clone(), question_ref, ops, @@ -2752,9 +2735,9 @@ where } impl From>>> for Client { - fn from(client: Rc>>) -> Client { + fn from(client: Rc>>) -> Self { let connection_state = client.borrow().connection_state.clone(); - Client::new(&connection_state, ClientVariant::Pipeline(client)) + Self::new(&connection_state, ClientVariant::Pipeline(client)) } } @@ -2788,8 +2771,8 @@ impl PromiseClient { connection_state: &Rc>, initial: Box, import_id: Option, - ) -> Rc>> { - Rc::new(RefCell::new(PromiseClient { + ) -> Rc> { + Rc::new(RefCell::new(Self { connection_state: connection_state.clone(), is_resolved: false, cap: initial, @@ -2910,18 +2893,15 @@ impl Drop for PromiseClient { } impl From>>> for Client { - fn from(client: Rc>>) -> Client { + fn from(client: Rc>>) -> Self { let connection_state = client.borrow().connection_state.clone(); - Client::new(&connection_state, ClientVariant::Promise(client)) + Self::new(&connection_state, ClientVariant::Promise(client)) } } impl Client { - fn new( - connection_state: &Rc>, - variant: ClientVariant, - ) -> Client { - let client = Client { + fn new(connection_state: &Rc>, variant: ClientVariant) -> Self { + let client = Self { connection_state: connection_state.clone(), variant, }; @@ -2955,7 +2935,7 @@ impl Client { } } - fn from_ptr(ptr: usize, connection_state: &ConnectionState) -> Option> { + fn from_ptr(ptr: usize, connection_state: &ConnectionState) -> Option { match connection_state.client_downcast_map.borrow().get(&ptr) { Some(c) => c.upgrade(), None => None, @@ -3045,7 +3025,7 @@ impl Client { } impl Clone for Client { - fn clone(&self) -> Client { + fn clone(&self) -> Self { let variant = match &self.variant { ClientVariant::Import(import_client) => ClientVariant::Import(import_client.clone()), ClientVariant::Pipeline(pipeline_client) => { @@ -3058,7 +3038,7 @@ impl Clone for Client { unimplemented!() } }; - Client { + Self { connection_state: self.connection_state.clone(), variant, } @@ -3202,14 +3182,14 @@ struct SingleCapPipeline { } impl SingleCapPipeline { - fn new(cap: Box) -> SingleCapPipeline { - SingleCapPipeline { cap } + fn new(cap: Box) -> Self { + Self { cap } } } impl PipelineHook for SingleCapPipeline { fn add_ref(&self) -> Box { - Box::new(SingleCapPipeline { + Box::new(Self { cap: self.cap.clone(), }) } diff --git a/capnp-rpc/src/rpc_capnp.rs b/capnp-rpc/src/rpc_capnp.rs index 95e510bab..65c730954 100644 --- a/capnp-rpc/src/rpc_capnp.rs +++ b/capnp-rpc/src/rpc_capnp.rs @@ -19,13 +19,13 @@ pub mod message { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -44,7 +44,7 @@ pub mod message { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -206,8 +206,8 @@ pub mod message { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -218,16 +218,16 @@ pub mod message { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -571,13 +571,13 @@ pub mod bootstrap { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -596,7 +596,7 @@ pub mod bootstrap { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -624,8 +624,8 @@ pub mod bootstrap { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -636,16 +636,16 @@ pub mod bootstrap { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -716,13 +716,13 @@ pub mod call { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -741,7 +741,7 @@ pub mod call { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -793,8 +793,8 @@ pub mod call { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -805,16 +805,16 @@ pub mod call { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -944,13 +944,13 @@ pub mod call { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -969,7 +969,7 @@ pub mod call { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1011,8 +1011,8 @@ pub mod call { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1023,16 +1023,16 @@ pub mod call { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1129,13 +1129,13 @@ pub mod return_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1154,7 +1154,7 @@ pub mod return_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1229,8 +1229,8 @@ pub mod return_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1241,16 +1241,16 @@ pub mod return_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1413,13 +1413,13 @@ pub mod finish { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1438,7 +1438,7 @@ pub mod finish { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1462,8 +1462,8 @@ pub mod finish { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1474,16 +1474,16 @@ pub mod finish { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1547,13 +1547,13 @@ pub mod resolve { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1572,7 +1572,7 @@ pub mod resolve { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1618,8 +1618,8 @@ pub mod resolve { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1630,16 +1630,16 @@ pub mod resolve { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1745,13 +1745,13 @@ pub mod release { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1770,7 +1770,7 @@ pub mod release { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1794,8 +1794,8 @@ pub mod release { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1806,16 +1806,16 @@ pub mod release { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1877,13 +1877,13 @@ pub mod disembargo { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1902,7 +1902,7 @@ pub mod disembargo { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1930,8 +1930,8 @@ pub mod disembargo { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1942,16 +1942,16 @@ pub mod disembargo { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2030,13 +2030,13 @@ pub mod disembargo { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2055,7 +2055,7 @@ pub mod disembargo { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2097,8 +2097,8 @@ pub mod disembargo { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2109,16 +2109,16 @@ pub mod disembargo { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2218,13 +2218,13 @@ pub mod provide { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2243,7 +2243,7 @@ pub mod provide { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2279,8 +2279,8 @@ pub mod provide { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2291,16 +2291,16 @@ pub mod provide { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2390,13 +2390,13 @@ pub mod accept { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2415,7 +2415,7 @@ pub mod accept { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2447,8 +2447,8 @@ pub mod accept { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2459,16 +2459,16 @@ pub mod accept { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2547,13 +2547,13 @@ pub mod join { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2572,7 +2572,7 @@ pub mod join { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2608,8 +2608,8 @@ pub mod join { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2620,16 +2620,16 @@ pub mod join { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2721,13 +2721,13 @@ pub mod message_target { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2746,7 +2746,7 @@ pub mod message_target { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2783,8 +2783,8 @@ pub mod message_target { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2795,16 +2795,16 @@ pub mod message_target { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2892,13 +2892,13 @@ pub mod payload { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2917,7 +2917,7 @@ pub mod payload { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2949,8 +2949,8 @@ pub mod payload { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2961,16 +2961,16 @@ pub mod payload { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3051,13 +3051,13 @@ pub mod cap_descriptor { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3076,7 +3076,7 @@ pub mod cap_descriptor { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3142,8 +3142,8 @@ pub mod cap_descriptor { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3154,16 +3154,16 @@ pub mod cap_descriptor { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3312,13 +3312,13 @@ pub mod promised_answer { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3337,7 +3337,7 @@ pub mod promised_answer { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3365,8 +3365,8 @@ pub mod promised_answer { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3377,16 +3377,16 @@ pub mod promised_answer { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3457,13 +3457,13 @@ pub mod promised_answer { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3482,7 +3482,7 @@ pub mod promised_answer { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3514,8 +3514,8 @@ pub mod promised_answer { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3526,16 +3526,16 @@ pub mod promised_answer { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3613,13 +3613,13 @@ pub mod third_party_cap_descriptor { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3638,7 +3638,7 @@ pub mod third_party_cap_descriptor { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3666,8 +3666,8 @@ pub mod third_party_cap_descriptor { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3678,16 +3678,16 @@ pub mod third_party_cap_descriptor { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3758,13 +3758,13 @@ pub mod exception { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3783,7 +3783,7 @@ pub mod exception { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3827,8 +3827,8 @@ pub mod exception { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3839,16 +3839,16 @@ pub mod exception { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { diff --git a/capnp-rpc/src/rpc_twoparty_capnp.rs b/capnp-rpc/src/rpc_twoparty_capnp.rs index 767315f19..7d3f76b5d 100644 --- a/capnp-rpc/src/rpc_twoparty_capnp.rs +++ b/capnp-rpc/src/rpc_twoparty_capnp.rs @@ -41,13 +41,13 @@ pub mod vat_id { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -66,7 +66,7 @@ pub mod vat_id { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -86,8 +86,8 @@ pub mod vat_id { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -98,16 +98,16 @@ pub mod vat_id { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -161,13 +161,13 @@ pub mod provision_id { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -186,7 +186,7 @@ pub mod provision_id { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -206,8 +206,8 @@ pub mod provision_id { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -218,16 +218,16 @@ pub mod provision_id { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -281,13 +281,13 @@ pub mod recipient_id { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -306,7 +306,7 @@ pub mod recipient_id { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -322,8 +322,8 @@ pub mod recipient_id { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -334,16 +334,16 @@ pub mod recipient_id { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -389,13 +389,13 @@ pub mod third_party_cap_id { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -414,7 +414,7 @@ pub mod third_party_cap_id { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -430,8 +430,8 @@ pub mod third_party_cap_id { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -442,16 +442,16 @@ pub mod third_party_cap_id { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -497,13 +497,13 @@ pub mod join_key_part { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -522,7 +522,7 @@ pub mod join_key_part { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -550,8 +550,8 @@ pub mod join_key_part { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -562,16 +562,16 @@ pub mod join_key_part { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -641,13 +641,13 @@ pub mod join_result { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -666,7 +666,7 @@ pub mod join_result { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -698,8 +698,8 @@ pub mod join_result { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -710,16 +710,16 @@ pub mod join_result { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { diff --git a/capnp-rpc/src/sender_queue.rs b/capnp-rpc/src/sender_queue.rs index 8349a7f59..13ec6edfd 100644 --- a/capnp-rpc/src/sender_queue.rs +++ b/capnp-rpc/src/sender_queue.rs @@ -79,8 +79,8 @@ where In: 'static, Out: 'static, { - pub fn new() -> SenderQueue { - SenderQueue { + pub fn new() -> Self { + Self { inner: Rc::new(RefCell::new(Inner { next_id: 0, map: BTreeMap::new(), diff --git a/capnp-rpc/src/task_set.rs b/capnp-rpc/src/task_set.rs index 68edea5de..bc202e457 100644 --- a/capnp-rpc/src/task_set.rs +++ b/capnp-rpc/src/task_set.rs @@ -49,10 +49,8 @@ impl Future for TaskInProgress { fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll { match *self { - TaskInProgress::Terminate(ref mut r) => { - Poll::Ready(TaskDone::Terminate(r.take().unwrap())) - } - TaskInProgress::Task(ref mut f) => match f.as_mut().poll(cx) { + Self::Terminate(ref mut r) => Poll::Ready(TaskDone::Terminate(r.take().unwrap())), + Self::Task(ref mut f) => match f.as_mut().poll(cx) { Poll::Pending => Poll::Pending, Poll::Ready(()) => Poll::Ready(TaskDone::Continue), }, @@ -71,14 +69,14 @@ impl TaskSet where E: 'static, { - pub fn new(reaper: Box>) -> (TaskSetHandle, TaskSet) + pub fn new(reaper: Box>) -> (TaskSetHandle, Self) where E: 'static, E: ::std::fmt::Debug, { let (sender, receiver) = mpsc::unbounded(); - let set = TaskSet { + let set = Self { enqueued: Some(receiver), in_progress: FuturesUnordered::new(), reaper: Rc::new(RefCell::new(reaper)), @@ -132,7 +130,7 @@ where fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll { let mut enqueued_stream_complete = false; - if let TaskSet { + if let Self { enqueued: Some(ref mut enqueued), ref mut in_progress, ref reaper, diff --git a/capnp-rpc/src/twoparty.rs b/capnp-rpc/src/twoparty.rs index 65917e167..ced1e68cf 100644 --- a/capnp-rpc/src/twoparty.rs +++ b/capnp-rpc/src/twoparty.rs @@ -36,10 +36,8 @@ struct IncomingMessage { } impl IncomingMessage { - pub fn new( - message: ::capnp::message::Reader, - ) -> IncomingMessage { - IncomingMessage { message } + pub fn new(message: ::capnp::message::Reader) -> Self { + Self { message } } } @@ -70,7 +68,7 @@ impl crate::OutgoingMessage for OutgoingMessage { Rc<::capnp::message::Builder<::capnp::message::HeapAllocator>>, ) { let tmp = *self; - let OutgoingMessage { + let Self { message, mut sender, } = tmp; @@ -128,8 +126,8 @@ where side: crate::rpc_twoparty_capnp::Side, receive_options: ReaderOptions, on_disconnect_fulfiller: oneshot::Sender<()>, - ) -> Connection { - Connection { + ) -> Self { + Self { inner: Rc::new(RefCell::new(ConnectionInner { input_stream: Rc::new(RefCell::new(Some(input_stream))), sender, @@ -226,7 +224,7 @@ where output_stream: U, side: crate::rpc_twoparty_capnp::Side, receive_options: ReaderOptions, - ) -> VatNetwork + ) -> Self where U: AsyncWrite + 'static + Unpin, { @@ -252,7 +250,7 @@ where let connection = Connection::new(input_stream, sender, side, receive_options, fulfiller); let weak_inner = Rc::downgrade(&connection.inner); - VatNetwork { + Self { connection: Some(connection), weak_connection_inner: weak_inner, execution_driver, diff --git a/capnp-rpc/test/impls.rs b/capnp-rpc/test/impls.rs index 498532343..3322d1d43 100644 --- a/capnp-rpc/test/impls.rs +++ b/capnp-rpc/test/impls.rs @@ -120,8 +120,8 @@ pub struct TestInterface { } impl TestInterface { - pub fn new() -> TestInterface { - TestInterface { + pub fn new() -> Self { + Self { call_count: Rc::new(Cell::new(0)), } } @@ -287,8 +287,8 @@ pub struct TestCallOrder { } impl TestCallOrder { - pub fn new() -> TestCallOrder { - TestCallOrder { count: 0 } + pub fn new() -> Self { + Self { count: 0 } } } @@ -311,8 +311,8 @@ pub struct TestMoreStuff { } impl TestMoreStuff { - pub fn new() -> TestMoreStuff { - TestMoreStuff { + pub fn new() -> Self { + Self { call_count: 0, handle_count: Rc::new(Cell::new(0)), client_to_hold: None, @@ -541,10 +541,10 @@ struct Handle { } impl Handle { - fn new(count: &Rc>) -> Handle { + fn new(count: &Rc>) -> Self { let count = count.clone(); count.set(count.get() + 1); - Handle { count: count } + Self { count: count } } } @@ -562,8 +562,8 @@ pub struct TestCapDestructor { } impl TestCapDestructor { - pub fn new(fulfiller: ::futures::channel::oneshot::Sender<()>) -> TestCapDestructor { - TestCapDestructor { + pub fn new(fulfiller: ::futures::channel::oneshot::Sender<()>) -> Self { + Self { fulfiller: Some(fulfiller), imp: TestInterface::new(), } diff --git a/capnp/src/private/layout.rs b/capnp/src/private/layout.rs index 56ccb25cc..0b30947d4 100644 --- a/capnp/src/private/layout.rs +++ b/capnp/src/private/layout.rs @@ -4100,7 +4100,7 @@ impl PrimitiveElement for T { impl PrimitiveElement for bool { #[inline] - fn get(list: &ListReader, index: ElementCount32) -> bool { + fn get(list: &ListReader, index: ElementCount32) -> Self { let bindex = u64::from(index) * u64::from(list.step); unsafe { let b: *const u8 = list.ptr.offset((bindex / BITS_PER_BYTE as u64) as isize); @@ -4108,13 +4108,13 @@ impl PrimitiveElement for bool { } } #[inline] - fn get_from_builder(list: &ListBuilder, index: ElementCount32) -> bool { + fn get_from_builder(list: &ListBuilder, index: ElementCount32) -> Self { let bindex = u64::from(index) * u64::from(list.step); let b = unsafe { list.ptr.offset((bindex / BITS_PER_BYTE as u64) as isize) }; unsafe { ((*b) & (1 << (bindex % BITS_PER_BYTE as u64))) != 0 } } #[inline] - fn set(list: &ListBuilder, index: ElementCount32, value: bool) { + fn set(list: &ListBuilder, index: ElementCount32, value: Self) { let bindex = u64::from(index) * u64::from(list.step); let b = unsafe { list.ptr.offset((bindex / BITS_PER_BYTE as u64) as isize) }; diff --git a/capnp/src/private/mask.rs b/capnp/src/private/mask.rs index 5c0816ca5..dfa211521 100644 --- a/capnp/src/private/mask.rs +++ b/capnp/src/private/mask.rs @@ -48,15 +48,15 @@ int_mask!(u64); impl Mask for f32 { type T = u32; #[inline] - fn mask(value: f32, mask: u32) -> f32 { - f32::from_bits(value.to_bits() ^ mask) + fn mask(value: Self, mask: u32) -> Self { + Self::from_bits(value.to_bits() ^ mask) } } impl Mask for f64 { type T = u64; #[inline] - fn mask(value: f64, mask: u64) -> f64 { - f64::from_bits(value.to_bits() ^ mask) + fn mask(value: Self, mask: u64) -> Self { + Self::from_bits(value.to_bits() ^ mask) } } diff --git a/capnp/src/private/primitive.rs b/capnp/src/private/primitive.rs index 27b74694e..df9c958e8 100644 --- a/capnp/src/private/primitive.rs +++ b/capnp/src/private/primitive.rs @@ -63,27 +63,27 @@ primitive_impl!(f64, 8); #[cfg(not(feature = "unaligned"))] impl Primitive for f32 { - type Raw = f32; + type Raw = Self; fn get(raw: &Self::Raw) -> Self { - f32::from_bits(raw.to_bits().to_le()) + Self::from_bits(raw.to_bits().to_le()) } fn set(raw: &mut Self::Raw, value: Self) { - *raw = f32::from_bits(value.to_bits().to_le()) + *raw = Self::from_bits(value.to_bits().to_le()) } } #[cfg(not(feature = "unaligned"))] impl Primitive for f64 { - type Raw = f64; + type Raw = Self; fn get(raw: &Self::Raw) -> Self { - f64::from_bits(raw.to_bits().to_le()) + Self::from_bits(raw.to_bits().to_le()) } fn set(raw: &mut Self::Raw, value: Self) { - *raw = f64::from_bits(value.to_bits().to_le()) + *raw = Self::from_bits(value.to_bits().to_le()) } } diff --git a/capnpc/src/codegen.rs b/capnpc/src/codegen.rs index 7e8f868f0..22c23b0eb 100644 --- a/capnpc/src/codegen.rs +++ b/capnpc/src/codegen.rs @@ -1720,10 +1720,10 @@ fn generate_node( Indent( Box::new( Branch(vec!( - Line(format!("fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,{}> {{", params.params)), + Line("fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self {".to_string()), Indent(Box::new(Line("::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE))".to_string()))), Line("}".to_string()), - Line(format!("fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> {{", params.params)), + Line("fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result {".to_string()), Indent(Box::new(Line("::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder.get_struct(::STRUCT_SIZE, default)?))".to_string()))), Line("}".to_string()))))), Line("}".to_string()), @@ -1777,8 +1777,8 @@ fn generate_node( params.params, params.where_clause)), Indent( Box::new(Branch(vec!( - Line(format!("fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a,{}> {{", params.params)), - Indent(Box::new(Line(format!("Reader {{ reader, {} }}", params.phantom_data_value)))), + Line("fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self {".to_string()), + Indent(Box::new(Line(format!("Self {{ reader, {} }}", params.phantom_data_value)))), Line("}".to_string()))))), Line("}".to_string()), BlankLine, @@ -1786,7 +1786,7 @@ fn generate_node( params.params, params.where_clause)), Indent( Box::new(Branch(vec!( - Line(format!("fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> {{",params.params)), + Line("fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result {".to_string()), Indent(Box::new(Line("::core::result::Result::Ok(::capnp::traits::FromStructReader::new(reader.get_struct(default)?))".to_string()))), Line("}".to_string()))))), Line("}".to_string()), @@ -1813,7 +1813,7 @@ fn generate_node( Indent( Box::new(Branch(vec![ Line(format!("pub fn reborrow(&self) -> Reader<'_,{}> {{",params.params)), - Indent(Box::new(Line("Reader { .. *self }".to_string()))), + Indent(Box::new(Line("Self { .. *self }".to_string()))), Line("}".to_string()), BlankLine, Line("pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {".to_string()), @@ -1847,8 +1847,8 @@ fn generate_node( params.params, params.where_clause)), Indent( Box::new(Branch(vec!( - Line(format!("fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, {}> {{", params.params)), - Indent(Box::new(Line(format!("Builder {{ builder, {} }}", params.phantom_data_value)))), + Line("fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self {".to_string()), + Indent(Box::new(Line(format!("Self {{ builder, {} }}", params.phantom_data_value)))), Line("}".to_string()))))), Line("}".to_string()), BlankLine, @@ -1866,7 +1866,7 @@ fn generate_node( Line(format!( "impl <'a,{0}> ::capnp::traits::SetPointerBuilder for Reader<'a,{0}> {1} {{", params.params, params.where_clause)), - Indent(Box::new(Line(format!("fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a,{}>, canonicalize: bool) -> ::capnp::Result<()> {{ pointer.set_struct(&value.reader, canonicalize) }}", params.params)))), + Indent(Box::new(Line("fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) }".to_string()))), Line("}".to_string()), BlankLine, Line(format!("impl <'a,{0}> Builder<'a,{0}> {1} {{", params.params, params.where_clause)), @@ -2168,8 +2168,8 @@ fn generate_node( mod_interior.push( Branch(vec!( Line(format!("impl {} ::capnp::capability::FromClientHook for Client{} {{", bracketed_params, bracketed_params)), - Indent(Box::new(Line(format!("fn new(hook: Box) -> Client{} {{", bracketed_params)))), - Indent(Box::new(Indent(Box::new(Line(format!("Client {{ client: ::capnp::capability::Client::new(hook), {} }}", params.phantom_data_value)))))), + Indent(Box::new(Line("fn new(hook: Box) -> Self {".to_string()))), + Indent(Box::new(Indent(Box::new(Line(format!("Self {{ client: ::capnp::capability::Client::new(hook), {} }}", params.phantom_data_value)))))), Indent(Box::new(Line("}".to_string()))), Indent(Box::new(Line("fn into_client_hook(self) -> Box {".to_string()))), Indent(Box::new(Indent(Box::new(Line("self.client.hook".to_string()))))), @@ -2204,7 +2204,7 @@ fn generate_node( params.params, params.where_clause)), Indent( Box::new(Branch(vec![ - Line(format!("fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> {{",params.params)), + Line("fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result {".to_string()), Indent(Box::new(Line("::core::result::Result::Ok(::capnp::capability::FromClientHook::new(reader.get_capability()?))".to_string()))), Line("}".to_string())]))), Line("}".to_string())))); @@ -2215,10 +2215,10 @@ fn generate_node( Indent( Box::new( Branch(vec![ - Line(format!("fn init_pointer(_builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Client<{}> {{", params.params)), + Line("fn init_pointer(_builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self {".to_string()), Indent(Box::new(Line("unimplemented!()".to_string()))), Line("}".to_string()), - Line(format!("fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> {{", params.params)), + Line("fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result {".to_string()), Indent(Box::new(Line("::core::result::Result::Ok(::capnp::capability::FromClientHook::new(builder.get_capability()?))".to_string()))), Line("}".to_string())]))), Line("}".to_string()), @@ -2231,8 +2231,7 @@ fn generate_node( Indent( Box::new( Branch(vec![ - Line(format!("fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Client<{}>, _canonicalize: bool) -> ::capnp::Result<()> {{", - params.params)), + Line("fn set_pointer_builder(pointer: ::capnp::private::layout::PointerBuilder<'_>, from: Self, _canonicalize: bool) -> ::capnp::Result<()> {".to_string()), Indent(Box::new(Line( "pointer.set_capability(from.client.hook);".to_string()))), Indent(Box::new(Line( @@ -2255,7 +2254,7 @@ fn generate_node( Branch(vec!( Line(format!("impl {0} Clone for Client{0} {{", bracketed_params)), Indent(Box::new(Line("fn clone(&self) -> Self {".to_string()))), - Indent(Box::new(Indent(Box::new(Line(format!("Client {{ client: ::capnp::capability::Client::new(self.client.hook.add_ref()), {} }}", params.phantom_data_value)))))), + Indent(Box::new(Indent(Box::new(Line(format!("Self {{ client: ::capnp::capability::Client::new(self.client.hook.add_ref()), {} }}", params.phantom_data_value)))))), Indent(Box::new(Line("}".to_string()))), Line("}".to_string())))); @@ -2334,7 +2333,7 @@ fn generate_node( Indent(Box::new(Line("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> {".to_string()))), Indent(Box::new(Indent(Box::new(Line("match interface_id {".to_string()))))), Indent(Box::new(Indent(Box::new(Indent( - Box::new(Line(format!("_private::TYPE_ID => ServerDispatch::<_T, {}>::dispatch_call_internal(&mut self.server, method_id, params, results),",params.params)))))))), + Box::new(Line("_private::TYPE_ID => Self::dispatch_call_internal(&mut self.server, method_id, params, results),".to_string()))))))), Indent(Box::new(Indent(Box::new(Indent(Box::new(Branch(base_dispatch_arms))))))), Indent(Box::new(Indent(Box::new(Indent(Box::new(Line("_ => { ::capnp::capability::Promise::err(::capnp::Error::unimplemented(\"Method not implemented.\".to_string())) }".to_string()))))))), Indent(Box::new(Indent(Box::new(Line("}".to_string()))))), diff --git a/capnpc/src/schema_capnp.rs b/capnpc/src/schema_capnp.rs index 406fbb618..666757636 100644 --- a/capnpc/src/schema_capnp.rs +++ b/capnpc/src/schema_capnp.rs @@ -19,13 +19,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -44,7 +44,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -144,8 +144,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -156,16 +156,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -406,13 +406,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -431,7 +431,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -455,8 +455,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -467,16 +467,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -538,13 +538,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -563,7 +563,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -591,8 +591,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -603,16 +603,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -682,13 +682,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -707,7 +707,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -743,8 +743,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -755,16 +755,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -849,13 +849,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -874,7 +874,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -898,8 +898,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -910,16 +910,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -982,13 +982,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1007,7 +1007,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1055,8 +1055,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1067,16 +1067,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1186,13 +1186,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1211,7 +1211,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1235,8 +1235,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1247,16 +1247,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1318,13 +1318,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1343,7 +1343,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1375,8 +1375,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1387,16 +1387,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1474,13 +1474,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1499,7 +1499,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1531,8 +1531,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1543,16 +1543,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1636,13 +1636,13 @@ pub mod node { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1661,7 +1661,7 @@ pub mod node { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -1733,8 +1733,8 @@ pub mod node { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -1745,16 +1745,16 @@ pub mod node { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -1918,13 +1918,13 @@ pub mod field { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -1943,7 +1943,7 @@ pub mod field { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2003,8 +2003,8 @@ pub mod field { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2015,16 +2015,16 @@ pub mod field { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2168,13 +2168,13 @@ pub mod field { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2193,7 +2193,7 @@ pub mod field { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2233,8 +2233,8 @@ pub mod field { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2245,16 +2245,16 @@ pub mod field { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2354,13 +2354,13 @@ pub mod field { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2379,7 +2379,7 @@ pub mod field { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2399,8 +2399,8 @@ pub mod field { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2411,16 +2411,16 @@ pub mod field { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2476,13 +2476,13 @@ pub mod field { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2501,7 +2501,7 @@ pub mod field { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2533,8 +2533,8 @@ pub mod field { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2545,16 +2545,16 @@ pub mod field { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2632,13 +2632,13 @@ pub mod enumerant { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2657,7 +2657,7 @@ pub mod enumerant { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2693,8 +2693,8 @@ pub mod enumerant { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2705,16 +2705,16 @@ pub mod enumerant { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2800,13 +2800,13 @@ pub mod superclass { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2825,7 +2825,7 @@ pub mod superclass { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -2853,8 +2853,8 @@ pub mod superclass { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -2865,16 +2865,16 @@ pub mod superclass { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -2947,13 +2947,13 @@ pub mod method { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -2972,7 +2972,7 @@ pub mod method { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3040,8 +3040,8 @@ pub mod method { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3052,16 +3052,16 @@ pub mod method { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3219,13 +3219,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3244,7 +3244,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3361,8 +3361,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3373,16 +3373,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3644,13 +3644,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3669,7 +3669,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3693,8 +3693,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3705,16 +3705,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3779,13 +3779,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3804,7 +3804,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3832,8 +3832,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3844,16 +3844,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -3926,13 +3926,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -3951,7 +3951,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -3979,8 +3979,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -3991,16 +3991,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4073,13 +4073,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4098,7 +4098,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -4126,8 +4126,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -4138,16 +4138,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4222,13 +4222,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4247,7 +4247,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -4284,8 +4284,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -4296,16 +4296,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4399,13 +4399,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4424,7 +4424,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -4466,8 +4466,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -4478,16 +4478,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4583,13 +4583,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4608,7 +4608,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -4632,8 +4632,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -4644,16 +4644,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4715,13 +4715,13 @@ pub mod type_ { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4740,7 +4740,7 @@ pub mod type_ { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -4760,8 +4760,8 @@ pub mod type_ { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -4772,16 +4772,16 @@ pub mod type_ { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4837,13 +4837,13 @@ pub mod brand { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4862,7 +4862,7 @@ pub mod brand { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -4886,8 +4886,8 @@ pub mod brand { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -4898,16 +4898,16 @@ pub mod brand { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -4970,13 +4970,13 @@ pub mod brand { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -4995,7 +4995,7 @@ pub mod brand { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -5036,8 +5036,8 @@ pub mod brand { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -5048,16 +5048,16 @@ pub mod brand { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -5154,13 +5154,13 @@ pub mod brand { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -5179,7 +5179,7 @@ pub mod brand { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -5216,8 +5216,8 @@ pub mod brand { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -5228,16 +5228,16 @@ pub mod brand { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -5327,13 +5327,13 @@ pub mod value { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -5352,7 +5352,7 @@ pub mod value { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -5494,8 +5494,8 @@ pub mod value { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -5506,16 +5506,16 @@ pub mod value { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -5819,13 +5819,13 @@ pub mod annotation { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -5844,7 +5844,7 @@ pub mod annotation { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -5880,8 +5880,8 @@ pub mod annotation { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -5892,16 +5892,16 @@ pub mod annotation { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -6029,13 +6029,13 @@ pub mod capnp_version { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -6054,7 +6054,7 @@ pub mod capnp_version { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -6082,8 +6082,8 @@ pub mod capnp_version { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -6094,16 +6094,16 @@ pub mod capnp_version { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -6173,13 +6173,13 @@ pub mod code_generator_request { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -6198,7 +6198,7 @@ pub mod code_generator_request { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -6246,8 +6246,8 @@ pub mod code_generator_request { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -6258,16 +6258,16 @@ pub mod code_generator_request { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -6379,13 +6379,13 @@ pub mod code_generator_request { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -6404,7 +6404,7 @@ pub mod code_generator_request { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -6440,8 +6440,8 @@ pub mod code_generator_request { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -6452,16 +6452,16 @@ pub mod code_generator_request { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> { @@ -6546,13 +6546,13 @@ pub mod code_generator_request { const 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, } + fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Self { + Self { 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> { + 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)?)) } } @@ -6571,7 +6571,7 @@ pub mod code_generator_request { impl <'a,> Reader<'a,> { pub fn reborrow(&self) -> Reader<'_,> { - Reader { .. *self } + Self { .. *self } } pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { @@ -6599,8 +6599,8 @@ pub mod code_generator_request { const 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, } + fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { + Self { builder, } } } @@ -6611,16 +6611,16 @@ pub mod code_generator_request { } impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Builder<'a,> { + fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { ::capnp::traits::FromStructBuilder::new(builder.init_struct(::STRUCT_SIZE)) } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [capnp::Word]>) -> ::capnp::Result> { + 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(::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) } + fn set_pointer_builder<'b>(pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } impl <'a,> Builder<'a,> {