From e04517d5f4bd72c18dc5806d1ab838f507d60cb4 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Tue, 22 Nov 2022 07:59:32 +0000 Subject: [PATCH] remove 'IntoInternalStructReader' trait --- capnp-rpc/src/rpc_capnp.rs | 120 ++++++++-------- capnp-rpc/src/rpc_twoparty_capnp.rs | 36 ++--- capnp/src/raw.rs | 16 +-- capnp/src/struct_list.rs | 7 +- capnp/src/traits.rs | 6 +- capnpc/src/codegen.rs | 6 +- capnpc/src/schema_capnp.rs | 210 ++++++++++++++-------------- 7 files changed, 195 insertions(+), 206 deletions(-) diff --git a/capnp-rpc/src/rpc_capnp.rs b/capnp-rpc/src/rpc_capnp.rs index 95e510bab..e7ea8d506 100644 --- a/capnp-rpc/src/rpc_capnp.rs +++ b/capnp-rpc/src/rpc_capnp.rs @@ -30,9 +30,9 @@ pub mod message { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -582,9 +582,9 @@ pub mod bootstrap { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -727,9 +727,9 @@ pub mod call { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -955,9 +955,9 @@ pub mod call { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1140,9 +1140,9 @@ pub mod return_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1424,9 +1424,9 @@ pub mod finish { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1558,9 +1558,9 @@ pub mod resolve { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1756,9 +1756,9 @@ pub mod release { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1888,9 +1888,9 @@ pub mod disembargo { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2041,9 +2041,9 @@ pub mod disembargo { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2229,9 +2229,9 @@ pub mod provide { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2401,9 +2401,9 @@ pub mod accept { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2558,9 +2558,9 @@ pub mod join { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2732,9 +2732,9 @@ pub mod message_target { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2903,9 +2903,9 @@ pub mod payload { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3062,9 +3062,9 @@ pub mod cap_descriptor { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3323,9 +3323,9 @@ pub mod promised_answer { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3468,9 +3468,9 @@ pub mod promised_answer { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3624,9 +3624,9 @@ pub mod third_party_cap_descriptor { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3769,9 +3769,9 @@ pub mod exception { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } diff --git a/capnp-rpc/src/rpc_twoparty_capnp.rs b/capnp-rpc/src/rpc_twoparty_capnp.rs index 767315f19..fbdfcf3f5 100644 --- a/capnp-rpc/src/rpc_twoparty_capnp.rs +++ b/capnp-rpc/src/rpc_twoparty_capnp.rs @@ -52,9 +52,9 @@ pub mod vat_id { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -172,9 +172,9 @@ pub mod provision_id { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -292,9 +292,9 @@ pub mod recipient_id { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -400,9 +400,9 @@ pub mod third_party_cap_id { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -508,9 +508,9 @@ pub mod join_key_part { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -652,9 +652,9 @@ pub mod join_result { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } diff --git a/capnp/src/raw.rs b/capnp/src/raw.rs index 5883b1207..35c949016 100644 --- a/capnp/src/raw.rs +++ b/capnp/src/raw.rs @@ -20,28 +20,22 @@ //! Functions providing low level access to encoded data. -use crate::traits::{IntoInternalListReader, IntoInternalStructReader}; +use crate::{private::layout::StructReader, traits::IntoInternalListReader}; /// Gets a slice view of the data section of a struct. pub fn get_struct_data_section<'a, T>(value: T) -> &'a [u8] where - T: IntoInternalStructReader<'a>, + T: Into>, { - value - .into_internal_struct_reader() - .get_data_section_as_blob() + value.into().get_data_section_as_blob() } /// Gets the pointer section as a list. pub fn get_struct_pointer_section<'a, T>(value: T) -> crate::any_pointer_list::Reader<'a> where - T: IntoInternalStructReader<'a>, + T: Into>, { - crate::any_pointer_list::Reader::new( - value - .into_internal_struct_reader() - .get_pointer_section_as_list(), - ) + crate::any_pointer_list::Reader::new(value.into().get_pointer_section_as_list()) } /// Gets the size of the elements in a list. diff --git a/capnp/src/struct_list.rs b/capnp/src/struct_list.rs index f421f98c2..2147a3152 100644 --- a/capnp/src/struct_list.rs +++ b/capnp/src/struct_list.rs @@ -24,7 +24,7 @@ use core::marker::PhantomData; use crate::private::layout::{ - InlineComposite, ListBuilder, ListReader, PointerBuilder, PointerReader, + InlineComposite, ListBuilder, ListReader, PointerBuilder, PointerReader, StructReader, }; use crate::traits::{ FromPointerBuilder, FromPointerReader, FromStructBuilder, FromStructReader, HasStructSize, @@ -186,12 +186,11 @@ where /// truncated, losing fields. pub fn set_with_caveats<'b>(&self, index: u32, value: T::Reader<'b>) -> Result<()> where - T::Reader<'b>: crate::traits::IntoInternalStructReader<'b>, + T::Reader<'b>: Into>, { - use crate::traits::IntoInternalStructReader; self.builder .get_struct_element(index) - .copy_content_from(&value.into_internal_struct_reader()) + .copy_content_from(&value.into()) } } diff --git a/capnp/src/traits.rs b/capnp/src/traits.rs index 7ce0ef33e..195c5fe91 100644 --- a/capnp/src/traits.rs +++ b/capnp/src/traits.rs @@ -34,10 +34,6 @@ pub trait HasStructSize { const STRUCT_SIZE: StructSize; } -pub trait IntoInternalStructReader<'a> { - fn into_internal_struct_reader(self) -> StructReader<'a>; -} - pub trait FromStructBuilder<'a> { fn new(struct_builder: StructBuilder<'a>) -> Self; } @@ -69,7 +65,7 @@ pub trait Owned { } pub trait OwnedStruct { - type Reader<'a>: FromStructReader<'a> + SetPointerBuilder + IntoInternalStructReader<'a>; + type Reader<'a>: FromStructReader<'a> + SetPointerBuilder + Into>; type Builder<'a>: FromStructBuilder<'a> + HasStructSize; } diff --git a/capnpc/src/codegen.rs b/capnpc/src/codegen.rs index 7e8f868f0..a85cbd6a9 100644 --- a/capnpc/src/codegen.rs +++ b/capnpc/src/codegen.rs @@ -1791,12 +1791,12 @@ fn generate_node( Line("}".to_string()))))), Line("}".to_string()), BlankLine, - Line(format!("impl <'a,{0}> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,{0}> {1} {{", + Line(format!("impl <'a,{0}> From> for ::capnp::private::layout::StructReader<'a> {1} {{", params.params, params.where_clause)), Indent( Box::new(Branch(vec!( - Line("fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {".to_string()), - Indent(Box::new(Line("self.reader".to_string()))), + Line(format!("fn from(reader: Reader<'a,{0}>) -> ::capnp::private::layout::StructReader<'a> {{", params.params)), + Indent(Box::new(Line("reader.reader".to_string()))), Line("}".to_string()))))), Line("}".to_string()), BlankLine, diff --git a/capnpc/src/schema_capnp.rs b/capnpc/src/schema_capnp.rs index 406fbb618..25272b212 100644 --- a/capnpc/src/schema_capnp.rs +++ b/capnpc/src/schema_capnp.rs @@ -30,9 +30,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -417,9 +417,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -549,9 +549,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -693,9 +693,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -860,9 +860,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -993,9 +993,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1197,9 +1197,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1329,9 +1329,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1485,9 +1485,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1647,9 +1647,9 @@ pub mod node { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -1929,9 +1929,9 @@ pub mod field { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2179,9 +2179,9 @@ pub mod field { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2365,9 +2365,9 @@ pub mod field { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2487,9 +2487,9 @@ pub mod field { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2643,9 +2643,9 @@ pub mod enumerant { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2811,9 +2811,9 @@ pub mod superclass { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -2958,9 +2958,9 @@ pub mod method { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3230,9 +3230,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3655,9 +3655,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3790,9 +3790,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -3937,9 +3937,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4084,9 +4084,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4233,9 +4233,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4410,9 +4410,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4594,9 +4594,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4726,9 +4726,9 @@ pub mod type_ { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4848,9 +4848,9 @@ pub mod brand { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -4981,9 +4981,9 @@ pub mod brand { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -5165,9 +5165,9 @@ pub mod brand { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -5338,9 +5338,9 @@ pub mod value { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -5830,9 +5830,9 @@ pub mod annotation { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -6040,9 +6040,9 @@ pub mod capnp_version { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -6184,9 +6184,9 @@ pub mod code_generator_request { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -6390,9 +6390,9 @@ pub mod code_generator_request { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } } @@ -6557,9 +6557,9 @@ pub mod code_generator_request { } } - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader + impl <'a,> From> for ::capnp::private::layout::StructReader<'a> { + fn from(reader: Reader<'a,>) -> ::capnp::private::layout::StructReader<'a> { + reader.reader } }