pub mod node {
pub use self::Which::{Annotation, Const, Enum, File, Interface, Struct};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_display_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_display_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_display_name_prefix_length(self) -> u32 {
self.reader.get_data_field::<u32>(2)
}
#[inline]
pub fn get_scope_id(self) -> u64 {
self.reader.get_data_field::<u64>(2)
}
#[inline]
pub fn get_nested_nodes(
self,
) -> crate::Result<
crate::struct_list::Reader<'a, crate::schema_capnp::node::nested_node::Owned>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_nested_nodes(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
#[inline]
pub fn get_parameters(
self,
) -> crate::Result<
crate::struct_list::Reader<'a, crate::schema_capnp::node::parameter::Owned>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(5),
::core::option::Option::None,
)
}
#[inline]
pub fn has_parameters(&self) -> bool {
!self.reader.get_pointer_field(5).is_null()
}
#[inline]
pub fn get_is_generic(self) -> bool {
self.reader.get_bool_field(288)
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(6) {
0 => ::core::result::Result::Ok(File(())),
1 => ::core::result::Result::Ok(Struct(self.reader.into())),
2 => ::core::result::Result::Ok(Enum(self.reader.into())),
3 => ::core::result::Result::Ok(Interface(self.reader.into())),
4 => ::core::result::Result::Ok(Const(self.reader.into())),
5 => ::core::result::Result::Ok(Annotation(self.reader.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 5,
pointers: 6,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_display_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_display_name(
&mut self,
value: impl crate::traits::SetterInput<crate::text::Owned>,
) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_display_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_display_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_display_name_prefix_length(self) -> u32 {
self.builder.get_data_field::<u32>(2)
}
#[inline]
pub fn set_display_name_prefix_length(&mut self, value: u32) {
self.builder.set_data_field::<u32>(2, value);
}
#[inline]
pub fn get_scope_id(self) -> u64 {
self.builder.get_data_field::<u64>(2)
}
#[inline]
pub fn set_scope_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(2, value);
}
#[inline]
pub fn get_nested_nodes(
self,
) -> crate::Result<
crate::struct_list::Builder<'a, crate::schema_capnp::node::nested_node::Owned>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_nested_nodes(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::node::nested_node::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_nested_nodes(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::node::nested_node::Owned>
{
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), size)
}
#[inline]
pub fn has_nested_nodes(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_annotations(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::annotation::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(2),
value,
false,
)
}
#[inline]
pub fn init_annotations(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(2), size)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.builder.is_pointer_field_null(2)
}
#[inline]
pub fn set_file(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(6, 0);
}
#[inline]
pub fn init_struct(mut self) -> crate::schema_capnp::node::struct_::Builder<'a> {
self.builder.set_data_field::<u16>(6, 1);
self.builder.set_data_field::<u16>(7, 0u16);
self.builder.set_data_field::<u16>(12, 0u16);
self.builder.set_data_field::<u16>(13, 0u16);
self.builder.set_bool_field(224, false);
self.builder.set_data_field::<u16>(15, 0u16);
self.builder.set_data_field::<u32>(8, 0u32);
self.builder.reborrow().get_pointer_field(3).clear();
self.builder.into()
}
#[inline]
pub fn init_enum(mut self) -> crate::schema_capnp::node::enum_::Builder<'a> {
self.builder.set_data_field::<u16>(6, 2);
self.builder.reborrow().get_pointer_field(3).clear();
self.builder.into()
}
#[inline]
pub fn init_interface(mut self) -> crate::schema_capnp::node::interface::Builder<'a> {
self.builder.set_data_field::<u16>(6, 3);
self.builder.reborrow().get_pointer_field(3).clear();
self.builder.reborrow().get_pointer_field(4).clear();
self.builder.into()
}
#[inline]
pub fn init_const(mut self) -> crate::schema_capnp::node::const_::Builder<'a> {
self.builder.set_data_field::<u16>(6, 4);
self.builder.reborrow().get_pointer_field(3).clear();
self.builder.reborrow().get_pointer_field(4).clear();
self.builder.into()
}
#[inline]
pub fn init_annotation(mut self) -> crate::schema_capnp::node::annotation::Builder<'a> {
self.builder.set_data_field::<u16>(6, 5);
self.builder.reborrow().get_pointer_field(3).clear();
self.builder.set_bool_field(112, false);
self.builder.set_bool_field(113, false);
self.builder.set_bool_field(114, false);
self.builder.set_bool_field(115, false);
self.builder.set_bool_field(116, false);
self.builder.set_bool_field(117, false);
self.builder.set_bool_field(118, false);
self.builder.set_bool_field(119, false);
self.builder.set_bool_field(120, false);
self.builder.set_bool_field(121, false);
self.builder.set_bool_field(122, false);
self.builder.set_bool_field(123, false);
self.builder.into()
}
#[inline]
pub fn get_parameters(
self,
) -> crate::Result<
crate::struct_list::Builder<'a, crate::schema_capnp::node::parameter::Owned>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(5),
::core::option::Option::None,
)
}
#[inline]
pub fn set_parameters(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::node::parameter::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(5),
value,
false,
)
}
#[inline]
pub fn init_parameters(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::node::parameter::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(5), size)
}
#[inline]
pub fn has_parameters(&self) -> bool {
!self.builder.is_pointer_field_null(5)
}
#[inline]
pub fn get_is_generic(self) -> bool {
self.builder.get_bool_field(288)
}
#[inline]
pub fn set_is_generic(&mut self, value: bool) {
self.builder.set_bool_field(288, value);
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(6) {
0 => ::core::result::Result::Ok(File(())),
1 => ::core::result::Result::Ok(Struct(self.builder.into())),
2 => ::core::result::Result::Ok(Enum(self.builder.into())),
3 => ::core::result::Result::Ok(Interface(self.builder.into())),
4 => ::core::result::Result::Ok(Const(self.builder.into())),
5 => ::core::result::Result::Ok(Annotation(self.builder.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 225] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(13, 0, 0, 0, 1, 0, 5, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(6, 0, 7, 0, 0, 0, 6, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 146, 0, 0, 0),
crate::word(29, 0, 0, 0, 55, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 23, 3, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 1, 0, 1, 0),
crate::word(177, 163, 15, 241, 204, 27, 82, 185),
crate::word(17, 0, 0, 0, 82, 0, 0, 0),
crate::word(66, 194, 15, 250, 187, 85, 191, 222),
crate::word(17, 0, 0, 0, 90, 0, 0, 0),
crate::word(174, 87, 19, 4, 227, 29, 142, 243),
crate::word(17, 0, 0, 0, 90, 0, 0, 0),
crate::word(80, 97, 114, 97, 109, 101, 116, 101),
crate::word(114, 0, 0, 0, 0, 0, 0, 0),
crate::word(78, 101, 115, 116, 101, 100, 78, 111),
crate::word(100, 101, 0, 0, 0, 0, 0, 0),
crate::word(83, 111, 117, 114, 99, 101, 73, 110),
crate::word(102, 111, 0, 0, 0, 0, 0, 0),
crate::word(56, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(121, 1, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 1, 0, 0, 3, 0, 1, 0),
crate::word(128, 1, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(125, 1, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(124, 1, 0, 0, 3, 0, 1, 0),
crate::word(136, 1, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(133, 1, 0, 0, 194, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(136, 1, 0, 0, 3, 0, 1, 0),
crate::word(148, 1, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 3, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(145, 1, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(140, 1, 0, 0, 3, 0, 1, 0),
crate::word(152, 1, 0, 0, 2, 0, 1, 0),
crate::word(6, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 4, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(149, 1, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(148, 1, 0, 0, 3, 0, 1, 0),
crate::word(176, 1, 0, 0, 2, 0, 1, 0),
crate::word(7, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 5, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(173, 1, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(172, 1, 0, 0, 3, 0, 1, 0),
crate::word(200, 1, 0, 0, 2, 0, 1, 0),
crate::word(8, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 6, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(197, 1, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(192, 1, 0, 0, 3, 0, 1, 0),
crate::word(204, 1, 0, 0, 2, 0, 1, 0),
crate::word(9, 0, 254, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(53, 68, 251, 55, 155, 177, 160, 158),
crate::word(201, 1, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(10, 0, 253, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(152, 245, 51, 67, 54, 179, 74, 181),
crate::word(177, 1, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(11, 0, 252, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(143, 33, 194, 240, 207, 83, 39, 232),
crate::word(153, 1, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 251, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(32, 148, 13, 122, 172, 165, 138, 177),
crate::word(133, 1, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 250, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(144, 2, 10, 64, 212, 25, 22, 236),
crate::word(109, 1, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 5, 0, 0, 0),
crate::word(0, 0, 1, 0, 32, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(89, 1, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(88, 1, 0, 0, 3, 0, 1, 0),
crate::word(116, 1, 0, 0, 2, 0, 1, 0),
crate::word(5, 0, 0, 0, 32, 1, 0, 0),
crate::word(0, 0, 1, 0, 33, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(113, 1, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 1, 0, 0, 3, 0, 1, 0),
crate::word(124, 1, 0, 0, 2, 0, 1, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 105, 115, 112, 108, 97, 121, 78),
crate::word(97, 109, 101, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 105, 115, 112, 108, 97, 121, 78),
crate::word(97, 109, 101, 80, 114, 101, 102, 105),
crate::word(120, 76, 101, 110, 103, 116, 104, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 111, 112, 101, 73, 100, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(110, 101, 115, 116, 101, 100, 78, 111),
crate::word(100, 101, 115, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(66, 194, 15, 250, 187, 85, 191, 222),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 110, 110, 111, 116, 97, 116, 105),
crate::word(111, 110, 115, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(66, 117, 37, 171, 13, 149, 200, 241),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 105, 108, 101, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 116, 114, 117, 99, 116, 0, 0),
crate::word(101, 110, 117, 109, 0, 0, 0, 0),
crate::word(105, 110, 116, 101, 114, 102, 97, 99),
crate::word(101, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 111, 110, 115, 116, 0, 0, 0),
crate::word(97, 110, 110, 111, 116, 97, 116, 105),
crate::word(111, 110, 0, 0, 0, 0, 0, 0),
crate::word(112, 97, 114, 97, 109, 101, 116, 101),
crate::word(114, 115, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(177, 163, 15, 241, 204, 27, 82, 185),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 115, 71, 101, 110, 101, 114, 105),
crate::word(99, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
2 => <u32 as crate::introspect::Introspect>::introspect(),
3 => <u64 as crate::introspect::Introspect>::introspect(),
4 => <crate::struct_list::Owned<crate::schema_capnp::node::nested_node::Owned> as crate::introspect::Introspect>::introspect(),
5 => <crate::struct_list::Owned<crate::schema_capnp::annotation::Owned> as crate::introspect::Introspect>::introspect(),
6 => <() as crate::introspect::Introspect>::introspect(),
7 => <crate::schema_capnp::node::struct_::Owned as crate::introspect::Introspect>::introspect(),
8 => <crate::schema_capnp::node::enum_::Owned as crate::introspect::Introspect>::introspect(),
9 => <crate::schema_capnp::node::interface::Owned as crate::introspect::Introspect>::introspect(),
10 => <crate::schema_capnp::node::const_::Owned as crate::introspect::Introspect>::introspect(),
11 => <crate::schema_capnp::node::annotation::Owned as crate::introspect::Introspect>::introspect(),
12 => <crate::struct_list::Owned<crate::schema_capnp::node::parameter::Owned> as crate::introspect::Introspect>::introspect(),
13 => <bool as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3, 4, 5, 12, 13];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[6, 7, 8, 9, 10, 11];
pub static MEMBERS_BY_NAME: &[u16] = &[11, 5, 10, 1, 2, 8, 6, 0, 9, 13, 4, 12, 3, 7];
pub const TYPE_ID: u64 = 0xe682_ab4c_f923_a417;
}
pub enum Which<A0, A1, A2, A3, A4> {
File(()),
Struct(A0),
Enum(A1),
Interface(A2),
Const(A3),
Annotation(A4),
}
pub type WhichReader<'a> = Which<
crate::schema_capnp::node::struct_::Reader<'a>,
crate::schema_capnp::node::enum_::Reader<'a>,
crate::schema_capnp::node::interface::Reader<'a>,
crate::schema_capnp::node::const_::Reader<'a>,
crate::schema_capnp::node::annotation::Reader<'a>,
>;
pub type WhichBuilder<'a> = Which<
crate::schema_capnp::node::struct_::Builder<'a>,
crate::schema_capnp::node::enum_::Builder<'a>,
crate::schema_capnp::node::interface::Builder<'a>,
crate::schema_capnp::node::const_::Builder<'a>,
crate::schema_capnp::node::annotation::Builder<'a>,
>;
pub mod parameter {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 0,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: impl crate::traits::SetterInput<crate::text::Owned>) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 33] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(177, 163, 15, 241, 204, 27, 82, 185),
crate::word(18, 0, 0, 0, 1, 0, 0, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(1, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 226, 0, 0, 0),
crate::word(33, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 80, 97, 114, 97, 109, 101),
crate::word(116, 101, 114, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 1, 0),
crate::word(20, 0, 0, 0, 2, 0, 1, 0),
crate::word(110, 97, 109, 101, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0xb952_1bcc_f10f_a3b1;
}
}
pub mod nested_node {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: impl crate::traits::SetterInput<crate::text::Owned>) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 48] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(66, 194, 15, 250, 187, 85, 191, 222),
crate::word(18, 0, 0, 0, 1, 0, 1, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(1, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 234, 0, 0, 0),
crate::word(33, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 78, 101, 115, 116, 101, 100),
crate::word(78, 111, 100, 101, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(110, 97, 109, 101, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
1 => <u64 as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0xdebf_55bb_fa0f_c242;
}
}
pub mod source_info {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_doc_comment(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_doc_comment(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_members(
self,
) -> crate::Result<
crate::struct_list::Reader<
'a,
crate::schema_capnp::node::source_info::member::Owned,
>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_members(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 2,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_doc_comment(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_doc_comment(
&mut self,
value: impl crate::traits::SetterInput<crate::text::Owned>,
) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_doc_comment(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_doc_comment(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_members(
self,
) -> crate::Result<
crate::struct_list::Builder<
'a,
crate::schema_capnp::node::source_info::member::Owned,
>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_members(
&mut self,
value: crate::struct_list::Reader<
'_,
crate::schema_capnp::node::source_info::member::Owned,
>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_members(
self,
size: u32,
) -> crate::struct_list::Builder<
'a,
crate::schema_capnp::node::source_info::member::Owned,
> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(1),
size,
)
}
#[inline]
pub fn has_members(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 71] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(174, 87, 19, 4, 227, 29, 142, 243),
crate::word(18, 0, 0, 0, 1, 0, 1, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(2, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 234, 0, 0, 0),
crate::word(33, 0, 0, 0, 23, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 83, 111, 117, 114, 99, 101),
crate::word(73, 110, 102, 111, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 1, 0, 1, 0),
crate::word(162, 31, 142, 137, 56, 144, 186, 194),
crate::word(1, 0, 0, 0, 58, 0, 0, 0),
crate::word(77, 101, 109, 98, 101, 114, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 0, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 0, 0, 0, 3, 0, 1, 0),
crate::word(76, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(72, 0, 0, 0, 3, 0, 1, 0),
crate::word(84, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(81, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(76, 0, 0, 0, 3, 0, 1, 0),
crate::word(104, 0, 0, 0, 2, 0, 1, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 111, 99, 67, 111, 109, 109, 101),
crate::word(110, 116, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(109, 101, 109, 98, 101, 114, 115, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(162, 31, 142, 137, 56, 144, 186, 194),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
2 => <crate::struct_list::Owned<
crate::schema_capnp::node::source_info::member::Owned,
> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0, 2];
pub const TYPE_ID: u64 = 0xf38e_1de3_0413_57ae;
}
pub mod member {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
)
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_doc_comment(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_doc_comment(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 0,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(
<Self as crate::traits::HasStructSize>::STRUCT_SIZE,
default,
)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_doc_comment(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_doc_comment(
&mut self,
value: impl crate::traits::SetterInput<crate::text::Owned>,
) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_doc_comment(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_doc_comment(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 35] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(162, 31, 142, 137, 56, 144, 186, 194),
crate::word(29, 0, 0, 0, 1, 0, 0, 0),
crate::word(174, 87, 19, 4, 227, 29, 142, 243),
crate::word(1, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 34, 1, 0, 0),
crate::word(37, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(33, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 83, 111, 117, 114, 99, 101),
crate::word(73, 110, 102, 111, 46, 77, 101, 109),
crate::word(98, 101, 114, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 1, 0),
crate::word(24, 0, 0, 0, 2, 0, 1, 0),
crate::word(100, 111, 99, 67, 111, 109, 109, 101),
crate::word(110, 116, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0xc2ba_9038_898e_1fa2;
}
}
}
pub mod struct_ {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_data_word_count(self) -> u16 {
self.reader.get_data_field::<u16>(7)
}
#[inline]
pub fn get_pointer_count(self) -> u16 {
self.reader.get_data_field::<u16>(12)
}
#[inline]
pub fn get_preferred_list_encoding(
self,
) -> ::core::result::Result<crate::schema_capnp::ElementSize, crate::NotInSchema>
{
::core::convert::TryInto::try_into(self.reader.get_data_field::<u16>(13))
}
#[inline]
pub fn get_is_group(self) -> bool {
self.reader.get_bool_field(224)
}
#[inline]
pub fn get_discriminant_count(self) -> u16 {
self.reader.get_data_field::<u16>(15)
}
#[inline]
pub fn get_discriminant_offset(self) -> u32 {
self.reader.get_data_field::<u32>(8)
}
#[inline]
pub fn get_fields(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::field::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_fields(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 5,
pointers: 6,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_data_word_count(self) -> u16 {
self.builder.get_data_field::<u16>(7)
}
#[inline]
pub fn set_data_word_count(&mut self, value: u16) {
self.builder.set_data_field::<u16>(7, value);
}
#[inline]
pub fn get_pointer_count(self) -> u16 {
self.builder.get_data_field::<u16>(12)
}
#[inline]
pub fn set_pointer_count(&mut self, value: u16) {
self.builder.set_data_field::<u16>(12, value);
}
#[inline]
pub fn get_preferred_list_encoding(
self,
) -> ::core::result::Result<crate::schema_capnp::ElementSize, crate::NotInSchema>
{
::core::convert::TryInto::try_into(self.builder.get_data_field::<u16>(13))
}
#[inline]
pub fn set_preferred_list_encoding(&mut self, value: crate::schema_capnp::ElementSize) {
self.builder.set_data_field::<u16>(13, value as u16);
}
#[inline]
pub fn get_is_group(self) -> bool {
self.builder.get_bool_field(224)
}
#[inline]
pub fn set_is_group(&mut self, value: bool) {
self.builder.set_bool_field(224, value);
}
#[inline]
pub fn get_discriminant_count(self) -> u16 {
self.builder.get_data_field::<u16>(15)
}
#[inline]
pub fn set_discriminant_count(&mut self, value: u16) {
self.builder.set_data_field::<u16>(15, value);
}
#[inline]
pub fn get_discriminant_offset(self) -> u32 {
self.builder.get_data_field::<u32>(8)
}
#[inline]
pub fn set_discriminant_offset(&mut self, value: u32) {
self.builder.set_data_field::<u32>(8, value);
}
#[inline]
pub fn get_fields(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::field::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_fields(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::field::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_fields(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::field::Owned> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
size,
)
}
#[inline]
pub fn has_fields(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 134] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(53, 68, 251, 55, 155, 177, 160, 158),
crate::word(18, 0, 0, 0, 1, 0, 5, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(6, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 202, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 143, 1, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 115, 116, 114, 117, 99, 116),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(28, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 1, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(181, 0, 0, 0, 114, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(180, 0, 0, 0, 3, 0, 1, 0),
crate::word(192, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 12, 0, 0, 0),
crate::word(0, 0, 1, 0, 8, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(189, 0, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(188, 0, 0, 0, 3, 0, 1, 0),
crate::word(200, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 13, 0, 0, 0),
crate::word(0, 0, 1, 0, 9, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(197, 0, 0, 0, 178, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(200, 0, 0, 0, 3, 0, 1, 0),
crate::word(212, 0, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 224, 0, 0, 0),
crate::word(0, 0, 1, 0, 10, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(209, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(204, 0, 0, 0, 3, 0, 1, 0),
crate::word(216, 0, 0, 0, 2, 0, 1, 0),
crate::word(4, 0, 0, 0, 15, 0, 0, 0),
crate::word(0, 0, 1, 0, 11, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(213, 0, 0, 0, 146, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(216, 0, 0, 0, 3, 0, 1, 0),
crate::word(228, 0, 0, 0, 2, 0, 1, 0),
crate::word(5, 0, 0, 0, 8, 0, 0, 0),
crate::word(0, 0, 1, 0, 12, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(225, 0, 0, 0, 154, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(228, 0, 0, 0, 3, 0, 1, 0),
crate::word(240, 0, 0, 0, 2, 0, 1, 0),
crate::word(6, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 13, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(237, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(232, 0, 0, 0, 3, 0, 1, 0),
crate::word(4, 1, 0, 0, 2, 0, 1, 0),
crate::word(100, 97, 116, 97, 87, 111, 114, 100),
crate::word(67, 111, 117, 110, 116, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 111, 105, 110, 116, 101, 114, 67),
crate::word(111, 117, 110, 116, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 114, 101, 102, 101, 114, 114, 101),
crate::word(100, 76, 105, 115, 116, 69, 110, 99),
crate::word(111, 100, 105, 110, 103, 0, 0, 0),
crate::word(15, 0, 0, 0, 0, 0, 0, 0),
crate::word(38, 25, 82, 186, 125, 143, 149, 209),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(15, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 115, 71, 114, 111, 117, 112, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 105, 115, 99, 114, 105, 109, 105),
crate::word(110, 97, 110, 116, 67, 111, 117, 110),
crate::word(116, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 105, 115, 99, 114, 105, 109, 105),
crate::word(110, 97, 110, 116, 79, 102, 102, 115),
crate::word(101, 116, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 105, 101, 108, 100, 115, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(95, 244, 74, 31, 164, 80, 173, 154),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u16 as crate::introspect::Introspect>::introspect(),
1 => <u16 as crate::introspect::Introspect>::introspect(),
2 => <crate::schema_capnp::ElementSize as crate::introspect::Introspect>::introspect(),
3 => <bool as crate::introspect::Introspect>::introspect(),
4 => <u16 as crate::introspect::Introspect>::introspect(),
5 => <u32 as crate::introspect::Introspect>::introspect(),
6 => <crate::struct_list::Owned<crate::schema_capnp::field::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3, 4, 5, 6];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0, 4, 5, 6, 3, 1, 2];
pub const TYPE_ID: u64 = 0x9ea0_b19b_37fb_4435;
}
}
pub mod enum_ {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_enumerants(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::enumerant::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_enumerants(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 5,
pointers: 6,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_enumerants(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::enumerant::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_enumerants(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::enumerant::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_enumerants(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::enumerant::Owned>
{
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
size,
)
}
#[inline]
pub fn has_enumerants(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 36] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(152, 245, 51, 67, 54, 179, 74, 181),
crate::word(18, 0, 0, 0, 1, 0, 5, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(6, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 186, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 101, 110, 117, 109, 0, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 14, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 1, 0),
crate::word(40, 0, 0, 0, 2, 0, 1, 0),
crate::word(101, 110, 117, 109, 101, 114, 97, 110),
crate::word(116, 115, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(77, 154, 84, 220, 235, 124, 138, 151),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::struct_list::Owned<crate::schema_capnp::enumerant::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0xb54a_b336_4333_f598;
}
}
pub mod interface {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_methods(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::method::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_methods(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_superclasses(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::superclass::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn has_superclasses(&self) -> bool {
!self.reader.get_pointer_field(4).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 5,
pointers: 6,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_methods(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::method::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_methods(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::method::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_methods(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::method::Owned> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
size,
)
}
#[inline]
pub fn has_methods(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
#[inline]
pub fn get_superclasses(
self,
) -> crate::Result<
crate::struct_list::Builder<'a, crate::schema_capnp::superclass::Owned>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn set_superclasses(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::superclass::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(4),
value,
false,
)
}
#[inline]
pub fn init_superclasses(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::superclass::Owned>
{
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(4),
size,
)
}
#[inline]
pub fn has_superclasses(&self) -> bool {
!self.builder.is_pointer_field_null(4)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 56] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(143, 33, 194, 240, 207, 83, 39, 232),
crate::word(18, 0, 0, 0, 1, 0, 5, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(6, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 226, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 105, 110, 116, 101, 114, 102),
crate::word(97, 99, 101, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 15, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(64, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 4, 0, 0, 0),
crate::word(0, 0, 1, 0, 31, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(61, 0, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(60, 0, 0, 0, 3, 0, 1, 0),
crate::word(88, 0, 0, 0, 2, 0, 1, 0),
crate::word(109, 101, 116, 104, 111, 100, 115, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(128, 77, 51, 59, 226, 204, 0, 149),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 117, 112, 101, 114, 99, 108, 97),
crate::word(115, 115, 101, 115, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(248, 215, 164, 208, 158, 42, 150, 169),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::struct_list::Owned<crate::schema_capnp::method::Owned> as crate::introspect::Introspect>::introspect(),
1 => <crate::struct_list::Owned<crate::schema_capnp::superclass::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0, 1];
pub const TYPE_ID: u64 = 0xe827_53cf_f0c2_218f;
}
}
pub mod const_ {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_type(self) -> crate::Result<crate::schema_capnp::type_::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_type(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_value(self) -> crate::Result<crate::schema_capnp::value::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn has_value(&self) -> bool {
!self.reader.get_pointer_field(4).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 5,
pointers: 6,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_type(self) -> crate::Result<crate::schema_capnp::type_::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_type(
&mut self,
value: crate::schema_capnp::type_::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_type(self) -> crate::schema_capnp::type_::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
0,
)
}
#[inline]
pub fn has_type(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
#[inline]
pub fn get_value(self) -> crate::Result<crate::schema_capnp::value::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn set_value(
&mut self,
value: crate::schema_capnp::value::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(4),
value,
false,
)
}
#[inline]
pub fn init_value(self) -> crate::schema_capnp::value::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(4),
0,
)
}
#[inline]
pub fn has_value(&self) -> bool {
!self.builder.is_pointer_field_null(4)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_type(&self) -> crate::schema_capnp::type_::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(3))
}
pub fn get_value(&self) -> crate::schema_capnp::value::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(4))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 46] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(32, 148, 13, 122, 172, 165, 138, 177),
crate::word(18, 0, 0, 0, 1, 0, 5, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(6, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 194, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 99, 111, 110, 115, 116, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 16, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 4, 0, 0, 0),
crate::word(0, 0, 1, 0, 17, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(116, 121, 112, 101, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(118, 97, 108, 117, 101, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(155, 12, 176, 215, 210, 220, 35, 206),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::schema_capnp::type_::Owned as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::value::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0, 1];
pub const TYPE_ID: u64 = 0xb18a_a5ac_7a0d_9420;
}
}
pub mod annotation {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_type(self) -> crate::Result<crate::schema_capnp::type_::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_type(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_targets_file(self) -> bool {
self.reader.get_bool_field(112)
}
#[inline]
pub fn get_targets_const(self) -> bool {
self.reader.get_bool_field(113)
}
#[inline]
pub fn get_targets_enum(self) -> bool {
self.reader.get_bool_field(114)
}
#[inline]
pub fn get_targets_enumerant(self) -> bool {
self.reader.get_bool_field(115)
}
#[inline]
pub fn get_targets_struct(self) -> bool {
self.reader.get_bool_field(116)
}
#[inline]
pub fn get_targets_field(self) -> bool {
self.reader.get_bool_field(117)
}
#[inline]
pub fn get_targets_union(self) -> bool {
self.reader.get_bool_field(118)
}
#[inline]
pub fn get_targets_group(self) -> bool {
self.reader.get_bool_field(119)
}
#[inline]
pub fn get_targets_interface(self) -> bool {
self.reader.get_bool_field(120)
}
#[inline]
pub fn get_targets_method(self) -> bool {
self.reader.get_bool_field(121)
}
#[inline]
pub fn get_targets_param(self) -> bool {
self.reader.get_bool_field(122)
}
#[inline]
pub fn get_targets_annotation(self) -> bool {
self.reader.get_bool_field(123)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 5,
pointers: 6,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_type(self) -> crate::Result<crate::schema_capnp::type_::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_type(
&mut self,
value: crate::schema_capnp::type_::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_type(self) -> crate::schema_capnp::type_::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
0,
)
}
#[inline]
pub fn has_type(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
#[inline]
pub fn get_targets_file(self) -> bool {
self.builder.get_bool_field(112)
}
#[inline]
pub fn set_targets_file(&mut self, value: bool) {
self.builder.set_bool_field(112, value);
}
#[inline]
pub fn get_targets_const(self) -> bool {
self.builder.get_bool_field(113)
}
#[inline]
pub fn set_targets_const(&mut self, value: bool) {
self.builder.set_bool_field(113, value);
}
#[inline]
pub fn get_targets_enum(self) -> bool {
self.builder.get_bool_field(114)
}
#[inline]
pub fn set_targets_enum(&mut self, value: bool) {
self.builder.set_bool_field(114, value);
}
#[inline]
pub fn get_targets_enumerant(self) -> bool {
self.builder.get_bool_field(115)
}
#[inline]
pub fn set_targets_enumerant(&mut self, value: bool) {
self.builder.set_bool_field(115, value);
}
#[inline]
pub fn get_targets_struct(self) -> bool {
self.builder.get_bool_field(116)
}
#[inline]
pub fn set_targets_struct(&mut self, value: bool) {
self.builder.set_bool_field(116, value);
}
#[inline]
pub fn get_targets_field(self) -> bool {
self.builder.get_bool_field(117)
}
#[inline]
pub fn set_targets_field(&mut self, value: bool) {
self.builder.set_bool_field(117, value);
}
#[inline]
pub fn get_targets_union(self) -> bool {
self.builder.get_bool_field(118)
}
#[inline]
pub fn set_targets_union(&mut self, value: bool) {
self.builder.set_bool_field(118, value);
}
#[inline]
pub fn get_targets_group(self) -> bool {
self.builder.get_bool_field(119)
}
#[inline]
pub fn set_targets_group(&mut self, value: bool) {
self.builder.set_bool_field(119, value);
}
#[inline]
pub fn get_targets_interface(self) -> bool {
self.builder.get_bool_field(120)
}
#[inline]
pub fn set_targets_interface(&mut self, value: bool) {
self.builder.set_bool_field(120, value);
}
#[inline]
pub fn get_targets_method(self) -> bool {
self.builder.get_bool_field(121)
}
#[inline]
pub fn set_targets_method(&mut self, value: bool) {
self.builder.set_bool_field(121, value);
}
#[inline]
pub fn get_targets_param(self) -> bool {
self.builder.get_bool_field(122)
}
#[inline]
pub fn set_targets_param(&mut self, value: bool) {
self.builder.set_bool_field(122, value);
}
#[inline]
pub fn get_targets_annotation(self) -> bool {
self.builder.get_bool_field(123)
}
#[inline]
pub fn set_targets_annotation(&mut self, value: bool) {
self.builder.set_bool_field(123, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_type(&self) -> crate::schema_capnp::type_::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(3))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 227] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(144, 2, 10, 64, 212, 25, 22, 236),
crate::word(18, 0, 0, 0, 1, 0, 5, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(6, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 234, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 223, 2, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 78, 111, 100),
crate::word(101, 46, 97, 110, 110, 111, 116, 97),
crate::word(116, 105, 111, 110, 0, 0, 0, 0),
crate::word(52, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 18, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(93, 1, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(88, 1, 0, 0, 3, 0, 1, 0),
crate::word(100, 1, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 112, 0, 0, 0),
crate::word(0, 0, 1, 0, 19, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 1, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 1, 0, 0, 3, 0, 1, 0),
crate::word(108, 1, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 113, 0, 0, 0),
crate::word(0, 0, 1, 0, 20, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 1, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(104, 1, 0, 0, 3, 0, 1, 0),
crate::word(116, 1, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 114, 0, 0, 0),
crate::word(0, 0, 1, 0, 21, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(113, 1, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 1, 0, 0, 3, 0, 1, 0),
crate::word(124, 1, 0, 0, 2, 0, 1, 0),
crate::word(4, 0, 0, 0, 115, 0, 0, 0),
crate::word(0, 0, 1, 0, 22, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(121, 1, 0, 0, 138, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(124, 1, 0, 0, 3, 0, 1, 0),
crate::word(136, 1, 0, 0, 2, 0, 1, 0),
crate::word(5, 0, 0, 0, 116, 0, 0, 0),
crate::word(0, 0, 1, 0, 23, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(133, 1, 0, 0, 114, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(132, 1, 0, 0, 3, 0, 1, 0),
crate::word(144, 1, 0, 0, 2, 0, 1, 0),
crate::word(6, 0, 0, 0, 117, 0, 0, 0),
crate::word(0, 0, 1, 0, 24, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(141, 1, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(140, 1, 0, 0, 3, 0, 1, 0),
crate::word(152, 1, 0, 0, 2, 0, 1, 0),
crate::word(7, 0, 0, 0, 118, 0, 0, 0),
crate::word(0, 0, 1, 0, 25, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(149, 1, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(148, 1, 0, 0, 3, 0, 1, 0),
crate::word(160, 1, 0, 0, 2, 0, 1, 0),
crate::word(8, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 1, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(157, 1, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(156, 1, 0, 0, 3, 0, 1, 0),
crate::word(168, 1, 0, 0, 2, 0, 1, 0),
crate::word(9, 0, 0, 0, 120, 0, 0, 0),
crate::word(0, 0, 1, 0, 27, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(165, 1, 0, 0, 138, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(168, 1, 0, 0, 3, 0, 1, 0),
crate::word(180, 1, 0, 0, 2, 0, 1, 0),
crate::word(10, 0, 0, 0, 121, 0, 0, 0),
crate::word(0, 0, 1, 0, 28, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(177, 1, 0, 0, 114, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(176, 1, 0, 0, 3, 0, 1, 0),
crate::word(188, 1, 0, 0, 2, 0, 1, 0),
crate::word(11, 0, 0, 0, 122, 0, 0, 0),
crate::word(0, 0, 1, 0, 29, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(185, 1, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(184, 1, 0, 0, 3, 0, 1, 0),
crate::word(196, 1, 0, 0, 2, 0, 1, 0),
crate::word(12, 0, 0, 0, 123, 0, 0, 0),
crate::word(0, 0, 1, 0, 30, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(193, 1, 0, 0, 146, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(196, 1, 0, 0, 3, 0, 1, 0),
crate::word(208, 1, 0, 0, 2, 0, 1, 0),
crate::word(116, 121, 112, 101, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 70),
crate::word(105, 108, 101, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 67),
crate::word(111, 110, 115, 116, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 69),
crate::word(110, 117, 109, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 69),
crate::word(110, 117, 109, 101, 114, 97, 110, 116),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 83),
crate::word(116, 114, 117, 99, 116, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 70),
crate::word(105, 101, 108, 100, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 85),
crate::word(110, 105, 111, 110, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 71),
crate::word(114, 111, 117, 112, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 73),
crate::word(110, 116, 101, 114, 102, 97, 99, 101),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 77),
crate::word(101, 116, 104, 111, 100, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 80),
crate::word(97, 114, 97, 109, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 97, 114, 103, 101, 116, 115, 65),
crate::word(110, 110, 111, 116, 97, 116, 105, 111),
crate::word(110, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::schema_capnp::type_::Owned as crate::introspect::Introspect>::introspect(),
1 => <bool as crate::introspect::Introspect>::introspect(),
2 => <bool as crate::introspect::Introspect>::introspect(),
3 => <bool as crate::introspect::Introspect>::introspect(),
4 => <bool as crate::introspect::Introspect>::introspect(),
5 => <bool as crate::introspect::Introspect>::introspect(),
6 => <bool as crate::introspect::Introspect>::introspect(),
7 => <bool as crate::introspect::Introspect>::introspect(),
8 => <bool as crate::introspect::Introspect>::introspect(),
9 => <bool as crate::introspect::Introspect>::introspect(),
10 => <bool as crate::introspect::Introspect>::introspect(),
11 => <bool as crate::introspect::Introspect>::introspect(),
12 => <bool as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[12, 2, 3, 4, 6, 1, 8, 9, 10, 11, 5, 7, 0];
pub const TYPE_ID: u64 = 0xec16_19d4_400a_0290;
}
}
}
pub mod field {
pub use self::Which::{Group, Slot};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_code_order(self) -> u16 {
self.reader.get_data_field::<u16>(0)
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_discriminant_value(self) -> u16 {
self.reader.get_data_field_mask::<u16>(1, 65535)
}
#[inline]
pub fn get_ordinal(self) -> crate::schema_capnp::field::ordinal::Reader<'a> {
self.reader.into()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(4) {
0 => ::core::result::Result::Ok(Slot(self.reader.into())),
1 => ::core::result::Result::Ok(Group(self.reader.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 4,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: impl crate::traits::SetterInput<crate::text::Owned>) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_code_order(self) -> u16 {
self.builder.get_data_field::<u16>(0)
}
#[inline]
pub fn set_code_order(&mut self, value: u16) {
self.builder.set_data_field::<u16>(0, value);
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_annotations(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::annotation::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_annotations(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), size)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
#[inline]
pub fn get_discriminant_value(self) -> u16 {
self.builder.get_data_field_mask::<u16>(1, 65535)
}
#[inline]
pub fn set_discriminant_value(&mut self, value: u16) {
self.builder.set_data_field_mask::<u16>(1, value, 65535);
}
#[inline]
pub fn init_slot(mut self) -> crate::schema_capnp::field::slot::Builder<'a> {
self.builder.set_data_field::<u16>(4, 0);
self.builder.set_data_field::<u32>(1, 0u32);
self.builder.reborrow().get_pointer_field(2).clear();
self.builder.reborrow().get_pointer_field(3).clear();
self.builder.set_bool_field(128, false);
self.builder.into()
}
#[inline]
pub fn init_group(self) -> crate::schema_capnp::field::group::Builder<'a> {
self.builder.set_data_field::<u16>(4, 1);
self.builder.set_data_field::<u64>(2, 0u64);
self.builder.into()
}
#[inline]
pub fn get_ordinal(self) -> crate::schema_capnp::field::ordinal::Builder<'a> {
self.builder.into()
}
#[inline]
pub fn init_ordinal(self) -> crate::schema_capnp::field::ordinal::Builder<'a> {
self.builder.set_data_field::<u16>(5, 0);
self.builder.set_data_field::<u16>(6, 0u16);
self.builder.into()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(4) {
0 => ::core::result::Result::Ok(Slot(self.builder.into())),
1 => ::core::result::Result::Ok(Group(self.builder.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_ordinal(&self) -> crate::schema_capnp::field::ordinal::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.noop())
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 113] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(95, 244, 74, 31, 164, 80, 173, 154),
crate::word(13, 0, 0, 0, 1, 0, 3, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(4, 0, 7, 0, 0, 0, 2, 0),
crate::word(4, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 154, 0, 0, 0),
crate::word(29, 0, 0, 0, 23, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 143, 1, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 70, 105, 101),
crate::word(108, 100, 0, 0, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 1, 0, 1, 0),
crate::word(18, 199, 254, 124, 190, 76, 177, 151),
crate::word(1, 0, 0, 0, 122, 0, 0, 0),
crate::word(110, 111, 68, 105, 115, 99, 114, 105),
crate::word(109, 105, 110, 97, 110, 116, 0, 0),
crate::word(28, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(181, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(176, 0, 0, 0, 3, 0, 1, 0),
crate::word(188, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(185, 0, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(184, 0, 0, 0, 3, 0, 1, 0),
crate::word(196, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(193, 0, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(192, 0, 0, 0, 3, 0, 1, 0),
crate::word(220, 0, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 3, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(217, 0, 0, 0, 146, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(220, 0, 0, 0, 3, 0, 1, 0),
crate::word(232, 0, 0, 0, 2, 0, 1, 0),
crate::word(4, 0, 255, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(111, 116, 180, 107, 71, 5, 35, 196),
crate::word(229, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(5, 0, 254, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(17, 29, 219, 104, 219, 205, 252, 202),
crate::word(205, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(230, 11, 135, 135, 194, 213, 144, 187),
crate::word(181, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(110, 97, 109, 101, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 111, 100, 101, 79, 114, 100, 101),
crate::word(114, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 110, 110, 111, 116, 97, 116, 105),
crate::word(111, 110, 115, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(66, 117, 37, 171, 13, 149, 200, 241),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 105, 115, 99, 114, 105, 109, 105),
crate::word(110, 97, 110, 116, 86, 97, 108, 117),
crate::word(101, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 108, 111, 116, 0, 0, 0, 0),
crate::word(103, 114, 111, 117, 112, 0, 0, 0),
crate::word(111, 114, 100, 105, 110, 97, 108, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
1 => <u16 as crate::introspect::Introspect>::introspect(),
2 => <crate::struct_list::Owned<crate::schema_capnp::annotation::Owned> as crate::introspect::Introspect>::introspect(),
3 => <u16 as crate::introspect::Introspect>::introspect(),
4 => <crate::schema_capnp::field::slot::Owned as crate::introspect::Introspect>::introspect(),
5 => <crate::schema_capnp::field::group::Owned as crate::introspect::Introspect>::introspect(),
6 => <crate::schema_capnp::field::ordinal::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3, 6];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[4, 5];
pub static MEMBERS_BY_NAME: &[u16] = &[2, 1, 3, 5, 0, 6, 4];
pub const TYPE_ID: u64 = 0x9aad_50a4_1f4a_f45f;
}
pub enum Which<A0, A1> {
Slot(A0),
Group(A1),
}
pub type WhichReader<'a> = Which<
crate::schema_capnp::field::slot::Reader<'a>,
crate::schema_capnp::field::group::Reader<'a>,
>;
pub type WhichBuilder<'a> = Which<
crate::schema_capnp::field::slot::Builder<'a>,
crate::schema_capnp::field::group::Builder<'a>,
>;
pub const NO_DISCRIMINANT: u16 = 65535;
pub mod slot {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_offset(self) -> u32 {
self.reader.get_data_field::<u32>(1)
}
#[inline]
pub fn get_type(self) -> crate::Result<crate::schema_capnp::type_::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn has_type(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
#[inline]
pub fn get_default_value(
self,
) -> crate::Result<crate::schema_capnp::value::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_default_value(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_had_explicit_default(self) -> bool {
self.reader.get_bool_field(128)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 4,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_offset(self) -> u32 {
self.builder.get_data_field::<u32>(1)
}
#[inline]
pub fn set_offset(&mut self, value: u32) {
self.builder.set_data_field::<u32>(1, value);
}
#[inline]
pub fn get_type(self) -> crate::Result<crate::schema_capnp::type_::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_type(
&mut self,
value: crate::schema_capnp::type_::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(2),
value,
false,
)
}
#[inline]
pub fn init_type(self) -> crate::schema_capnp::type_::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(2),
0,
)
}
#[inline]
pub fn has_type(&self) -> bool {
!self.builder.is_pointer_field_null(2)
}
#[inline]
pub fn get_default_value(
self,
) -> crate::Result<crate::schema_capnp::value::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_default_value(
&mut self,
value: crate::schema_capnp::value::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_default_value(self) -> crate::schema_capnp::value::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
0,
)
}
#[inline]
pub fn has_default_value(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
#[inline]
pub fn get_had_explicit_default(self) -> bool {
self.builder.get_bool_field(128)
}
#[inline]
pub fn set_had_explicit_default(&mut self, value: bool) {
self.builder.set_bool_field(128, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_type(&self) -> crate::schema_capnp::type_::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(2))
}
pub fn get_default_value(&self) -> crate::schema_capnp::value::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(3))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 79] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(111, 116, 180, 107, 71, 5, 35, 196),
crate::word(19, 0, 0, 0, 1, 0, 3, 0),
crate::word(95, 244, 74, 31, 164, 80, 173, 154),
crate::word(4, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 194, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 231, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 70, 105, 101),
crate::word(108, 100, 46, 115, 108, 111, 116, 0),
crate::word(16, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 4, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(92, 0, 0, 0, 3, 0, 1, 0),
crate::word(104, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 5, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(101, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 0, 0, 0, 3, 0, 1, 0),
crate::word(108, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 6, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 0, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(104, 0, 0, 0, 3, 0, 1, 0),
crate::word(116, 0, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 128, 0, 0, 0),
crate::word(0, 0, 1, 0, 10, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(113, 0, 0, 0, 154, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 0, 0, 0, 3, 0, 1, 0),
crate::word(128, 0, 0, 0, 2, 0, 1, 0),
crate::word(111, 102, 102, 115, 101, 116, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 121, 112, 101, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 101, 102, 97, 117, 108, 116, 86),
crate::word(97, 108, 117, 101, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(155, 12, 176, 215, 210, 220, 35, 206),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(104, 97, 100, 69, 120, 112, 108, 105),
crate::word(99, 105, 116, 68, 101, 102, 97, 117),
crate::word(108, 116, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u32 as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::type_::Owned as crate::introspect::Introspect>::introspect(),
2 => <crate::schema_capnp::value::Owned as crate::introspect::Introspect>::introspect(),
3 => <bool as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[2, 3, 0, 1];
pub const TYPE_ID: u64 = 0xc423_0547_6bb4_746f;
}
}
pub mod group {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.reader.get_data_field::<u64>(2)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 4,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.builder.get_data_field::<u64>(2)
}
#[inline]
pub fn set_type_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(2, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 32] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(17, 29, 219, 104, 219, 205, 252, 202),
crate::word(19, 0, 0, 0, 1, 0, 3, 0),
crate::word(95, 244, 74, 31, 164, 80, 173, 154),
crate::word(4, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 202, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 70, 105, 101),
crate::word(108, 100, 46, 103, 114, 111, 117, 112),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 1, 0),
crate::word(20, 0, 0, 0, 2, 0, 1, 0),
crate::word(116, 121, 112, 101, 73, 100, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0xcafc_cddb_68db_1d11;
}
}
pub mod ordinal {
pub use self::Which::{Explicit, Implicit};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(5) {
0 => ::core::result::Result::Ok(Implicit(())),
1 => ::core::result::Result::Ok(Explicit(self.reader.get_data_field::<u16>(6))),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 4,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn set_implicit(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(5, 0);
}
#[inline]
pub fn set_explicit(&mut self, value: u16) {
self.builder.set_data_field::<u16>(5, 1);
self.builder.set_data_field::<u16>(6, value);
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(5) {
0 => ::core::result::Result::Ok(Implicit(())),
1 => {
::core::result::Result::Ok(Explicit(self.builder.get_data_field::<u16>(6)))
}
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 49] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(230, 11, 135, 135, 194, 213, 144, 187),
crate::word(19, 0, 0, 0, 1, 0, 3, 0),
crate::word(95, 244, 74, 31, 164, 80, 173, 154),
crate::word(4, 0, 7, 0, 1, 0, 2, 0),
crate::word(5, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 218, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 70, 105, 101),
crate::word(108, 100, 46, 111, 114, 100, 105, 110),
crate::word(97, 108, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 8, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 74, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 254, 255, 6, 0, 0, 0),
crate::word(0, 0, 1, 0, 9, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(49, 0, 0, 0, 74, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(48, 0, 0, 0, 3, 0, 1, 0),
crate::word(60, 0, 0, 0, 2, 0, 1, 0),
crate::word(105, 109, 112, 108, 105, 99, 105, 116),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(101, 120, 112, 108, 105, 99, 105, 116),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <() as crate::introspect::Introspect>::introspect(),
1 => <u16 as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[0, 1];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0xbb90_d5c2_8787_0be6;
}
pub enum Which {
Implicit(()),
Explicit(u16),
}
pub type WhichReader = Which;
pub type WhichBuilder = Which;
}
}
pub mod enumerant {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_code_order(self) -> u16 {
self.reader.get_data_field::<u16>(0)
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 2,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: impl crate::traits::SetterInput<crate::text::Owned>) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_code_order(self) -> u16 {
self.builder.get_data_field::<u16>(0)
}
#[inline]
pub fn set_code_order(&mut self, value: u16) {
self.builder.set_data_field::<u16>(0, value);
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_annotations(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::annotation::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_annotations(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), size)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 68] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(77, 154, 84, 220, 235, 124, 138, 151),
crate::word(13, 0, 0, 0, 1, 0, 1, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(2, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 186, 0, 0, 0),
crate::word(29, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 69, 110, 117),
crate::word(109, 101, 114, 97, 110, 116, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 0, 0, 0, 3, 0, 1, 0),
crate::word(76, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(72, 0, 0, 0, 3, 0, 1, 0),
crate::word(84, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(81, 0, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(80, 0, 0, 0, 3, 0, 1, 0),
crate::word(108, 0, 0, 0, 2, 0, 1, 0),
crate::word(110, 97, 109, 101, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 111, 100, 101, 79, 114, 100, 101),
crate::word(114, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 110, 110, 111, 116, 97, 116, 105),
crate::word(111, 110, 115, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(66, 117, 37, 171, 13, 149, 200, 241),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
1 => <u16 as crate::introspect::Introspect>::introspect(),
2 => <crate::struct_list::Owned<crate::schema_capnp::annotation::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[2, 1, 0];
pub const TYPE_ID: u64 = 0x978a_7ceb_dc54_9a4d;
}
}
pub mod superclass {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 47] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(248, 215, 164, 208, 158, 42, 150, 169),
crate::word(13, 0, 0, 0, 1, 0, 1, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(1, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 194, 0, 0, 0),
crate::word(29, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 83, 117, 112),
crate::word(101, 114, 99, 108, 97, 115, 115, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 114, 97, 110, 100, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => {
<crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(
)
}
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0xa996_2a9e_d0a4_d7f8;
}
}
pub mod method {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_code_order(self) -> u16 {
self.reader.get_data_field::<u16>(0)
}
#[inline]
pub fn get_param_struct_type(self) -> u64 {
self.reader.get_data_field::<u64>(1)
}
#[inline]
pub fn get_result_struct_type(self) -> u64 {
self.reader.get_data_field::<u64>(2)
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_param_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn has_param_brand(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
#[inline]
pub fn get_result_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_result_brand(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_implicit_parameters(
self,
) -> crate::Result<
crate::struct_list::Reader<'a, crate::schema_capnp::node::parameter::Owned>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn has_implicit_parameters(&self) -> bool {
!self.reader.get_pointer_field(4).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 5,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: impl crate::traits::SetterInput<crate::text::Owned>) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_code_order(self) -> u16 {
self.builder.get_data_field::<u16>(0)
}
#[inline]
pub fn set_code_order(&mut self, value: u16) {
self.builder.set_data_field::<u16>(0, value);
}
#[inline]
pub fn get_param_struct_type(self) -> u64 {
self.builder.get_data_field::<u64>(1)
}
#[inline]
pub fn set_param_struct_type(&mut self, value: u64) {
self.builder.set_data_field::<u64>(1, value);
}
#[inline]
pub fn get_result_struct_type(self) -> u64 {
self.builder.get_data_field::<u64>(2)
}
#[inline]
pub fn set_result_struct_type(&mut self, value: u64) {
self.builder.set_data_field::<u64>(2, value);
}
#[inline]
pub fn get_annotations(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_annotations(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::annotation::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_annotations(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::annotation::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), size)
}
#[inline]
pub fn has_annotations(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
#[inline]
pub fn get_param_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_param_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(2),
value,
false,
)
}
#[inline]
pub fn init_param_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(2), 0)
}
#[inline]
pub fn has_param_brand(&self) -> bool {
!self.builder.is_pointer_field_null(2)
}
#[inline]
pub fn get_result_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_result_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_result_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(3), 0)
}
#[inline]
pub fn has_result_brand(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
#[inline]
pub fn get_implicit_parameters(
self,
) -> crate::Result<
crate::struct_list::Builder<'a, crate::schema_capnp::node::parameter::Owned>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn set_implicit_parameters(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::node::parameter::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(4),
value,
false,
)
}
#[inline]
pub fn init_implicit_parameters(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::node::parameter::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(4), size)
}
#[inline]
pub fn has_implicit_parameters(&self) -> bool {
!self.builder.is_pointer_field_null(4)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_param_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(2))
}
pub fn get_result_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(3))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 154] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(128, 77, 51, 59, 226, 204, 0, 149),
crate::word(13, 0, 0, 0, 1, 0, 3, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(5, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 162, 0, 0, 0),
crate::word(29, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 199, 1, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 77, 101, 116),
crate::word(104, 111, 100, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(32, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(209, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(204, 0, 0, 0, 3, 0, 1, 0),
crate::word(216, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(213, 0, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(212, 0, 0, 0, 3, 0, 1, 0),
crate::word(224, 0, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(221, 0, 0, 0, 130, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(220, 0, 0, 0, 3, 0, 1, 0),
crate::word(232, 0, 0, 0, 2, 0, 1, 0),
crate::word(5, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 3, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(229, 0, 0, 0, 138, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(232, 0, 0, 0, 3, 0, 1, 0),
crate::word(244, 0, 0, 0, 2, 0, 1, 0),
crate::word(7, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 4, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(241, 0, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(240, 0, 0, 0, 3, 0, 1, 0),
crate::word(12, 1, 0, 0, 2, 0, 1, 0),
crate::word(4, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 5, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 1, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 1, 0, 0, 3, 0, 1, 0),
crate::word(20, 1, 0, 0, 2, 0, 1, 0),
crate::word(6, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 6, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(17, 1, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 1, 0, 0, 3, 0, 1, 0),
crate::word(28, 1, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 4, 0, 0, 0),
crate::word(0, 0, 1, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 1, 0, 0, 154, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(28, 1, 0, 0, 3, 0, 1, 0),
crate::word(56, 1, 0, 0, 2, 0, 1, 0),
crate::word(110, 97, 109, 101, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 111, 100, 101, 79, 114, 100, 101),
crate::word(114, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 97, 114, 97, 109, 83, 116, 114),
crate::word(117, 99, 116, 84, 121, 112, 101, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(114, 101, 115, 117, 108, 116, 83, 116),
crate::word(114, 117, 99, 116, 84, 121, 112, 101),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 110, 110, 111, 116, 97, 116, 105),
crate::word(111, 110, 115, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(66, 117, 37, 171, 13, 149, 200, 241),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 97, 114, 97, 109, 66, 114, 97),
crate::word(110, 100, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(114, 101, 115, 117, 108, 116, 66, 114),
crate::word(97, 110, 100, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 109, 112, 108, 105, 99, 105, 116),
crate::word(80, 97, 114, 97, 109, 101, 116, 101),
crate::word(114, 115, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(177, 163, 15, 241, 204, 27, 82, 185),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
1 => <u16 as crate::introspect::Introspect>::introspect(),
2 => <u64 as crate::introspect::Introspect>::introspect(),
3 => <u64 as crate::introspect::Introspect>::introspect(),
4 => <crate::struct_list::Owned<crate::schema_capnp::annotation::Owned> as crate::introspect::Introspect>::introspect(),
5 => <crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(),
6 => <crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(),
7 => <crate::struct_list::Owned<crate::schema_capnp::node::parameter::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3, 4, 5, 6, 7];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[4, 1, 7, 0, 5, 2, 6, 3];
pub const TYPE_ID: u64 = 0x9500_cce2_3b33_4d80;
}
}
pub mod type_ {
pub use self::Which::{
AnyPointer, Bool, Data, Enum, Float32, Float64, Int16, Int32, Int64, Int8, Interface, List,
Struct, Text, Uint16, Uint32, Uint64, Uint8, Void,
};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Void(())),
1 => ::core::result::Result::Ok(Bool(())),
2 => ::core::result::Result::Ok(Int8(())),
3 => ::core::result::Result::Ok(Int16(())),
4 => ::core::result::Result::Ok(Int32(())),
5 => ::core::result::Result::Ok(Int64(())),
6 => ::core::result::Result::Ok(Uint8(())),
7 => ::core::result::Result::Ok(Uint16(())),
8 => ::core::result::Result::Ok(Uint32(())),
9 => ::core::result::Result::Ok(Uint64(())),
10 => ::core::result::Result::Ok(Float32(())),
11 => ::core::result::Result::Ok(Float64(())),
12 => ::core::result::Result::Ok(Text(())),
13 => ::core::result::Result::Ok(Data(())),
14 => ::core::result::Result::Ok(List(self.reader.into())),
15 => ::core::result::Result::Ok(Enum(self.reader.into())),
16 => ::core::result::Result::Ok(Struct(self.reader.into())),
17 => ::core::result::Result::Ok(Interface(self.reader.into())),
18 => ::core::result::Result::Ok(AnyPointer(self.reader.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn set_void(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 0);
}
#[inline]
pub fn set_bool(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 1);
}
#[inline]
pub fn set_int8(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 2);
}
#[inline]
pub fn set_int16(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 3);
}
#[inline]
pub fn set_int32(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 4);
}
#[inline]
pub fn set_int64(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 5);
}
#[inline]
pub fn set_uint8(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 6);
}
#[inline]
pub fn set_uint16(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 7);
}
#[inline]
pub fn set_uint32(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 8);
}
#[inline]
pub fn set_uint64(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 9);
}
#[inline]
pub fn set_float32(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 10);
}
#[inline]
pub fn set_float64(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 11);
}
#[inline]
pub fn set_text(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 12);
}
#[inline]
pub fn set_data(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 13);
}
#[inline]
pub fn init_list(mut self) -> crate::schema_capnp::type_::list::Builder<'a> {
self.builder.set_data_field::<u16>(0, 14);
self.builder.reborrow().get_pointer_field(0).clear();
self.builder.into()
}
#[inline]
pub fn init_enum(mut self) -> crate::schema_capnp::type_::enum_::Builder<'a> {
self.builder.set_data_field::<u16>(0, 15);
self.builder.set_data_field::<u64>(1, 0u64);
self.builder.reborrow().get_pointer_field(0).clear();
self.builder.into()
}
#[inline]
pub fn init_struct(mut self) -> crate::schema_capnp::type_::struct_::Builder<'a> {
self.builder.set_data_field::<u16>(0, 16);
self.builder.set_data_field::<u64>(1, 0u64);
self.builder.reborrow().get_pointer_field(0).clear();
self.builder.into()
}
#[inline]
pub fn init_interface(mut self) -> crate::schema_capnp::type_::interface::Builder<'a> {
self.builder.set_data_field::<u16>(0, 17);
self.builder.set_data_field::<u64>(1, 0u64);
self.builder.reborrow().get_pointer_field(0).clear();
self.builder.into()
}
#[inline]
pub fn init_any_pointer(self) -> crate::schema_capnp::type_::any_pointer::Builder<'a> {
self.builder.set_data_field::<u16>(0, 18);
self.builder.set_data_field::<u16>(4, 0);
self.builder.set_data_field::<u16>(5, 0);
self.builder.set_data_field::<u64>(2, 0u64);
self.builder.set_data_field::<u16>(5, 0u16);
self.builder.set_data_field::<u16>(5, 0u16);
self.builder.into()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Void(())),
1 => ::core::result::Result::Ok(Bool(())),
2 => ::core::result::Result::Ok(Int8(())),
3 => ::core::result::Result::Ok(Int16(())),
4 => ::core::result::Result::Ok(Int32(())),
5 => ::core::result::Result::Ok(Int64(())),
6 => ::core::result::Result::Ok(Uint8(())),
7 => ::core::result::Result::Ok(Uint16(())),
8 => ::core::result::Result::Ok(Uint32(())),
9 => ::core::result::Result::Ok(Uint64(())),
10 => ::core::result::Result::Ok(Float32(())),
11 => ::core::result::Result::Ok(Float64(())),
12 => ::core::result::Result::Ok(Text(())),
13 => ::core::result::Result::Ok(Data(())),
14 => ::core::result::Result::Ok(List(self.builder.into())),
15 => ::core::result::Result::Ok(Enum(self.builder.into())),
16 => ::core::result::Result::Ok(Struct(self.builder.into())),
17 => ::core::result::Result::Ok(Interface(self.builder.into())),
18 => ::core::result::Result::Ok(AnyPointer(self.builder.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 269] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(13, 0, 0, 0, 1, 0, 3, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(1, 0, 7, 0, 0, 0, 19, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 146, 0, 0, 0),
crate::word(29, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 47, 4, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(76, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(5, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 2, 0, 0, 3, 0, 1, 0),
crate::word(12, 2, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 254, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 2, 0, 0, 3, 0, 1, 0),
crate::word(16, 2, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 253, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 2, 0, 0, 3, 0, 1, 0),
crate::word(20, 2, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 252, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 3, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(17, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 2, 0, 0, 3, 0, 1, 0),
crate::word(24, 2, 0, 0, 2, 0, 1, 0),
crate::word(4, 0, 251, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 4, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 2, 0, 0, 3, 0, 1, 0),
crate::word(28, 2, 0, 0, 2, 0, 1, 0),
crate::word(5, 0, 250, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 5, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(20, 2, 0, 0, 3, 0, 1, 0),
crate::word(32, 2, 0, 0, 2, 0, 1, 0),
crate::word(6, 0, 249, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 6, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(24, 2, 0, 0, 3, 0, 1, 0),
crate::word(36, 2, 0, 0, 2, 0, 1, 0),
crate::word(7, 0, 248, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(33, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(28, 2, 0, 0, 3, 0, 1, 0),
crate::word(40, 2, 0, 0, 2, 0, 1, 0),
crate::word(8, 0, 247, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 8, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(37, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(32, 2, 0, 0, 3, 0, 1, 0),
crate::word(44, 2, 0, 0, 2, 0, 1, 0),
crate::word(9, 0, 246, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 9, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 2, 0, 0, 3, 0, 1, 0),
crate::word(48, 2, 0, 0, 2, 0, 1, 0),
crate::word(10, 0, 245, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 10, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 2, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 2, 0, 0, 3, 0, 1, 0),
crate::word(52, 2, 0, 0, 2, 0, 1, 0),
crate::word(11, 0, 244, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 11, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(49, 2, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(44, 2, 0, 0, 3, 0, 1, 0),
crate::word(56, 2, 0, 0, 2, 0, 1, 0),
crate::word(12, 0, 243, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 12, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(53, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(48, 2, 0, 0, 3, 0, 1, 0),
crate::word(60, 2, 0, 0, 2, 0, 1, 0),
crate::word(13, 0, 242, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 13, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(57, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(52, 2, 0, 0, 3, 0, 1, 0),
crate::word(64, 2, 0, 0, 2, 0, 1, 0),
crate::word(14, 0, 241, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(151, 234, 96, 10, 37, 57, 231, 135),
crate::word(61, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(15, 0, 240, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(169, 135, 127, 26, 113, 120, 14, 158),
crate::word(37, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 239, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(211, 198, 76, 239, 96, 111, 58, 172),
crate::word(13, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(17, 0, 238, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(191, 12, 251, 247, 105, 202, 139, 237),
crate::word(245, 1, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(18, 0, 237, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(241, 73, 62, 162, 232, 63, 87, 194),
crate::word(225, 1, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(118, 111, 105, 100, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 111, 111, 108, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 56, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 49, 54, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 51, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 54, 52, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 56, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 49, 54, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 51, 50, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 54, 52, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 108, 111, 97, 116, 51, 50, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 108, 111, 97, 116, 54, 52, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 101, 120, 116, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 97, 116, 97, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(108, 105, 115, 116, 0, 0, 0, 0),
crate::word(101, 110, 117, 109, 0, 0, 0, 0),
crate::word(115, 116, 114, 117, 99, 116, 0, 0),
crate::word(105, 110, 116, 101, 114, 102, 97, 99),
crate::word(101, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 110, 121, 80, 111, 105, 110, 116),
crate::word(101, 114, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <() as crate::introspect::Introspect>::introspect(),
1 => <() as crate::introspect::Introspect>::introspect(),
2 => <() as crate::introspect::Introspect>::introspect(),
3 => <() as crate::introspect::Introspect>::introspect(),
4 => <() as crate::introspect::Introspect>::introspect(),
5 => <() as crate::introspect::Introspect>::introspect(),
6 => <() as crate::introspect::Introspect>::introspect(),
7 => <() as crate::introspect::Introspect>::introspect(),
8 => <() as crate::introspect::Introspect>::introspect(),
9 => <() as crate::introspect::Introspect>::introspect(),
10 => <() as crate::introspect::Introspect>::introspect(),
11 => <() as crate::introspect::Introspect>::introspect(),
12 => <() as crate::introspect::Introspect>::introspect(),
13 => <() as crate::introspect::Introspect>::introspect(),
14 => <crate::schema_capnp::type_::list::Owned as crate::introspect::Introspect>::introspect(),
15 => <crate::schema_capnp::type_::enum_::Owned as crate::introspect::Introspect>::introspect(),
16 => <crate::schema_capnp::type_::struct_::Owned as crate::introspect::Introspect>::introspect(),
17 => <crate::schema_capnp::type_::interface::Owned as crate::introspect::Introspect>::introspect(),
18 => <crate::schema_capnp::type_::any_pointer::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
];
pub static MEMBERS_BY_NAME: &[u16] = &[
18, 1, 13, 15, 10, 11, 3, 4, 5, 2, 17, 14, 16, 12, 7, 8, 9, 6, 0,
];
pub const TYPE_ID: u64 = 0xd073_78ed_e1f9_cc60;
}
pub enum Which<A0, A1, A2, A3, A4> {
Void(()),
Bool(()),
Int8(()),
Int16(()),
Int32(()),
Int64(()),
Uint8(()),
Uint16(()),
Uint32(()),
Uint64(()),
Float32(()),
Float64(()),
Text(()),
Data(()),
List(A0),
Enum(A1),
Struct(A2),
Interface(A3),
AnyPointer(A4),
}
pub type WhichReader<'a> = Which<
crate::schema_capnp::type_::list::Reader<'a>,
crate::schema_capnp::type_::enum_::Reader<'a>,
crate::schema_capnp::type_::struct_::Reader<'a>,
crate::schema_capnp::type_::interface::Reader<'a>,
crate::schema_capnp::type_::any_pointer::Reader<'a>,
>;
pub type WhichBuilder<'a> = Which<
crate::schema_capnp::type_::list::Builder<'a>,
crate::schema_capnp::type_::enum_::Builder<'a>,
crate::schema_capnp::type_::struct_::Builder<'a>,
crate::schema_capnp::type_::interface::Builder<'a>,
crate::schema_capnp::type_::any_pointer::Builder<'a>,
>;
pub mod list {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_element_type(self) -> crate::Result<crate::schema_capnp::type_::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_element_type(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_element_type(
self,
) -> crate::Result<crate::schema_capnp::type_::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_element_type(
&mut self,
value: crate::schema_capnp::type_::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_element_type(self) -> crate::schema_capnp::type_::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
0,
)
}
#[inline]
pub fn has_element_type(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_element_type(&self) -> crate::schema_capnp::type_::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 32] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(151, 234, 96, 10, 37, 57, 231, 135),
crate::word(18, 0, 0, 0, 1, 0, 3, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(1, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 186, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 108, 105, 115, 116, 0, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 14, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 98, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 1, 0),
crate::word(24, 0, 0, 0, 2, 0, 1, 0),
crate::word(101, 108, 101, 109, 101, 110, 116, 84),
crate::word(121, 112, 101, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::schema_capnp::type_::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0x87e7_3925_0a60_ea97;
}
}
pub mod enum_ {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.reader.get_data_field::<u64>(1)
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.builder.get_data_field::<u64>(1)
}
#[inline]
pub fn set_type_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(1, value);
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
0,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 46] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(169, 135, 127, 26, 113, 120, 14, 158),
crate::word(18, 0, 0, 0, 1, 0, 3, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(1, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 186, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 101, 110, 117, 109, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 15, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 21, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(116, 121, 112, 101, 73, 100, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 114, 97, 110, 100, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0x9e0e_7871_1a7f_87a9;
}
}
pub mod struct_ {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.reader.get_data_field::<u64>(1)
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.builder.get_data_field::<u64>(1)
}
#[inline]
pub fn set_type_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(1, value);
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
0,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 47] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(211, 198, 76, 239, 96, 111, 58, 172),
crate::word(18, 0, 0, 0, 1, 0, 3, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(1, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 202, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 115, 116, 114, 117, 99, 116),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 16, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 22, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(116, 121, 112, 101, 73, 100, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 114, 97, 110, 100, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0xac3a_6f60_ef4c_c6d3;
}
}
pub mod interface {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.reader.get_data_field::<u64>(1)
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_type_id(self) -> u64 {
self.builder.get_data_field::<u64>(1)
}
#[inline]
pub fn set_type_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(1, value);
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
0,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 47] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(191, 12, 251, 247, 105, 202, 139, 237),
crate::word(18, 0, 0, 0, 1, 0, 3, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(1, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 226, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 105, 110, 116, 101, 114, 102),
crate::word(97, 99, 101, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 17, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 23, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(116, 121, 112, 101, 73, 100, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 114, 97, 110, 100, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0xed8b_ca69_f7fb_0cbf;
}
}
pub mod any_pointer {
pub use self::Which::{ImplicitMethodParameter, Parameter, Unconstrained};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(4) {
0 => ::core::result::Result::Ok(Unconstrained(self.reader.into())),
1 => ::core::result::Result::Ok(Parameter(self.reader.into())),
2 => ::core::result::Result::Ok(ImplicitMethodParameter(self.reader.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn init_unconstrained(
self,
) -> crate::schema_capnp::type_::any_pointer::unconstrained::Builder<'a> {
self.builder.set_data_field::<u16>(4, 0);
self.builder.set_data_field::<u16>(5, 0);
self.builder.into()
}
#[inline]
pub fn init_parameter(
self,
) -> crate::schema_capnp::type_::any_pointer::parameter::Builder<'a> {
self.builder.set_data_field::<u16>(4, 1);
self.builder.set_data_field::<u64>(2, 0u64);
self.builder.set_data_field::<u16>(5, 0u16);
self.builder.into()
}
#[inline]
pub fn init_implicit_method_parameter(
self,
) -> crate::schema_capnp::type_::any_pointer::implicit_method_parameter::Builder<'a>
{
self.builder.set_data_field::<u16>(4, 2);
self.builder.set_data_field::<u16>(5, 0u16);
self.builder.into()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(4) {
0 => ::core::result::Result::Ok(Unconstrained(self.builder.into())),
1 => ::core::result::Result::Ok(Parameter(self.builder.into())),
2 => ::core::result::Result::Ok(ImplicitMethodParameter(self.builder.into())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 45] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(241, 73, 62, 162, 232, 63, 87, 194),
crate::word(18, 0, 0, 0, 1, 0, 3, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(1, 0, 7, 0, 1, 0, 3, 0),
crate::word(4, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 234, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 97, 110, 121, 80, 111, 105),
crate::word(110, 116, 101, 114, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 255, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(86, 54, 89, 254, 121, 95, 59, 142),
crate::word(69, 0, 0, 0, 114, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 254, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(133, 74, 97, 244, 36, 247, 209, 157),
crate::word(49, 0, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(2, 0, 253, 255, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 226, 86, 12, 18, 201, 239, 186),
crate::word(29, 0, 0, 0, 194, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 110, 99, 111, 110, 115, 116, 114),
crate::word(97, 105, 110, 101, 100, 0, 0, 0),
crate::word(112, 97, 114, 97, 109, 101, 116, 101),
crate::word(114, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 109, 112, 108, 105, 99, 105, 116),
crate::word(77, 101, 116, 104, 111, 100, 80, 97),
crate::word(114, 97, 109, 101, 116, 101, 114, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::schema_capnp::type_::any_pointer::unconstrained::Owned as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::type_::any_pointer::parameter::Owned as crate::introspect::Introspect>::introspect(),
2 => <crate::schema_capnp::type_::any_pointer::implicit_method_parameter::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[0, 1, 2];
pub static MEMBERS_BY_NAME: &[u16] = &[2, 1, 0];
pub const TYPE_ID: u64 = 0xc257_3fe8_a23e_49f1;
}
pub enum Which<A0, A1, A2> {
Unconstrained(A0),
Parameter(A1),
ImplicitMethodParameter(A2),
}
pub type WhichReader<'a> = Which<
crate::schema_capnp::type_::any_pointer::unconstrained::Reader<'a>,
crate::schema_capnp::type_::any_pointer::parameter::Reader<'a>,
crate::schema_capnp::type_::any_pointer::implicit_method_parameter::Reader<'a>,
>;
pub type WhichBuilder<'a> = Which<
crate::schema_capnp::type_::any_pointer::unconstrained::Builder<'a>,
crate::schema_capnp::type_::any_pointer::parameter::Builder<'a>,
crate::schema_capnp::type_::any_pointer::implicit_method_parameter::Builder<'a>,
>;
pub mod unconstrained {
pub use self::Which::{AnyKind, Capability, List, Struct};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
)
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(5) {
0 => ::core::result::Result::Ok(AnyKind(())),
1 => ::core::result::Result::Ok(Struct(())),
2 => ::core::result::Result::Ok(List(())),
3 => ::core::result::Result::Ok(Capability(())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(
<Self as crate::traits::HasStructSize>::STRUCT_SIZE,
default,
)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn set_any_kind(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(5, 0);
}
#[inline]
pub fn set_struct(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(5, 1);
}
#[inline]
pub fn set_list(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(5, 2);
}
#[inline]
pub fn set_capability(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(5, 3);
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(5) {
0 => ::core::result::Result::Ok(AnyKind(())),
1 => ::core::result::Result::Ok(Struct(())),
2 => ::core::result::Result::Ok(List(())),
3 => ::core::result::Result::Ok(Capability(())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 80] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(86, 54, 89, 254, 121, 95, 59, 142),
crate::word(29, 0, 0, 0, 1, 0, 3, 0),
crate::word(241, 73, 62, 162, 232, 63, 87, 194),
crate::word(1, 0, 7, 0, 1, 0, 4, 0),
crate::word(5, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 90, 1, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(33, 0, 0, 0, 231, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 97, 110, 121, 80, 111, 105),
crate::word(110, 116, 101, 114, 46, 117, 110, 99),
crate::word(111, 110, 115, 116, 114, 97, 105, 110),
crate::word(101, 100, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 18, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(92, 0, 0, 0, 3, 0, 1, 0),
crate::word(104, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 254, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 25, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(101, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 0, 0, 0, 3, 0, 1, 0),
crate::word(108, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 253, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 0, 0, 0, 3, 0, 1, 0),
crate::word(112, 0, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 252, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 27, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(109, 0, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(108, 0, 0, 0, 3, 0, 1, 0),
crate::word(120, 0, 0, 0, 2, 0, 1, 0),
crate::word(97, 110, 121, 75, 105, 110, 100, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 116, 114, 117, 99, 116, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(108, 105, 115, 116, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 97, 112, 97, 98, 105, 108, 105),
crate::word(116, 121, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <() as crate::introspect::Introspect>::introspect(),
1 => <() as crate::introspect::Introspect>::introspect(),
2 => <() as crate::introspect::Introspect>::introspect(),
3 => <() as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[0, 1, 2, 3];
pub static MEMBERS_BY_NAME: &[u16] = &[0, 3, 2, 1];
pub const TYPE_ID: u64 = 0x8e3b_5f79_fe59_3656;
}
pub enum Which {
AnyKind(()),
Struct(()),
List(()),
Capability(()),
}
pub type WhichReader = Which;
pub type WhichBuilder = Which;
}
pub mod parameter {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
)
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_scope_id(self) -> u64 {
self.reader.get_data_field::<u64>(2)
}
#[inline]
pub fn get_parameter_index(self) -> u16 {
self.reader.get_data_field::<u16>(5)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(
<Self as crate::traits::HasStructSize>::STRUCT_SIZE,
default,
)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_scope_id(self) -> u64 {
self.builder.get_data_field::<u64>(2)
}
#[inline]
pub fn set_scope_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(2, value);
}
#[inline]
pub fn get_parameter_index(self) -> u16 {
self.builder.get_data_field::<u16>(5)
}
#[inline]
pub fn set_parameter_index(&mut self, value: u16) {
self.builder.set_data_field::<u16>(5, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 49] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(133, 74, 97, 244, 36, 247, 209, 157),
crate::word(29, 0, 0, 0, 1, 0, 3, 0),
crate::word(241, 73, 62, 162, 232, 63, 87, 194),
crate::word(1, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 58, 1, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 97, 110, 121, 80, 111, 105),
crate::word(110, 116, 101, 114, 46, 112, 97, 114),
crate::word(97, 109, 101, 116, 101, 114, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 19, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 5, 0, 0, 0),
crate::word(0, 0, 1, 0, 20, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 122, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(44, 0, 0, 0, 3, 0, 1, 0),
crate::word(56, 0, 0, 0, 2, 0, 1, 0),
crate::word(115, 99, 111, 112, 101, 73, 100, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(112, 97, 114, 97, 109, 101, 116, 101),
crate::word(114, 73, 110, 100, 101, 120, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <u16 as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0x9dd1_f724_f461_4a85;
}
}
pub mod implicit_method_parameter {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
)
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_parameter_index(self) -> u16 {
self.reader.get_data_field::<u16>(5)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 3,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(
<Self as crate::traits::HasStructSize>::STRUCT_SIZE,
default,
)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_parameter_index(self) -> u16 {
self.builder.get_data_field::<u16>(5)
}
#[inline]
pub fn set_parameter_index(&mut self, value: u16) {
self.builder.set_data_field::<u16>(5, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 36] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(116, 226, 86, 12, 18, 201, 239, 186),
crate::word(29, 0, 0, 0, 1, 0, 3, 0),
crate::word(241, 73, 62, 162, 232, 63, 87, 194),
crate::word(1, 0, 7, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 170, 1, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(37, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 84, 121, 112),
crate::word(101, 46, 97, 110, 121, 80, 111, 105),
crate::word(110, 116, 101, 114, 46, 105, 109, 112),
crate::word(108, 105, 99, 105, 116, 77, 101, 116),
crate::word(104, 111, 100, 80, 97, 114, 97, 109),
crate::word(101, 116, 101, 114, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 5, 0, 0, 0),
crate::word(0, 0, 1, 0, 24, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 122, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 1, 0),
crate::word(24, 0, 0, 0, 2, 0, 1, 0),
crate::word(112, 97, 114, 97, 109, 101, 116, 101),
crate::word(114, 73, 110, 100, 101, 120, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u16 as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0xbaef_c912_0c56_e274;
}
}
}
}
pub mod brand {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_scopes(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::brand::scope::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_scopes(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 0,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_scopes(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::brand::scope::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_scopes(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::brand::scope::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_scopes(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::brand::scope::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
}
#[inline]
pub fn has_scopes(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 42] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(13, 0, 0, 0, 1, 0, 0, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(1, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 154, 0, 0, 0),
crate::word(29, 0, 0, 0, 39, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(49, 0, 0, 0, 63, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 66, 114, 97),
crate::word(110, 100, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 1, 0, 1, 0),
crate::word(201, 107, 99, 169, 133, 52, 215, 171),
crate::word(9, 0, 0, 0, 50, 0, 0, 0),
crate::word(252, 231, 158, 150, 22, 205, 99, 200),
crate::word(5, 0, 0, 0, 66, 0, 0, 0),
crate::word(83, 99, 111, 112, 101, 0, 0, 0),
crate::word(66, 105, 110, 100, 105, 110, 103, 0),
crate::word(4, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 3, 0, 1, 0),
crate::word(36, 0, 0, 0, 2, 0, 1, 0),
crate::word(115, 99, 111, 112, 101, 115, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(201, 107, 99, 169, 133, 52, 215, 171),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::struct_list::Owned<crate::schema_capnp::brand::scope::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0];
pub const TYPE_ID: u64 = 0x9034_55f0_6065_422b;
}
pub mod scope {
pub use self::Which::{Bind, Inherit};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_scope_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn has_bind(&self) -> bool {
if self.reader.get_data_field::<u16>(4) != 0 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(4) {
0 => ::core::result::Result::Ok(Bind(
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
1 => ::core::result::Result::Ok(Inherit(())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 2,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_scope_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_scope_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn set_bind(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::brand::binding::Owned>,
) -> crate::Result<()> {
self.builder.set_data_field::<u16>(4, 0);
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_bind(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::brand::binding::Owned>
{
self.builder.set_data_field::<u16>(4, 0);
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
size,
)
}
#[inline]
pub fn has_bind(&self) -> bool {
if self.builder.get_data_field::<u16>(4) != 0 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn set_inherit(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(4, 1);
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(4) {
0 => ::core::result::Result::Ok(Bind(
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
1 => ::core::result::Result::Ok(Inherit(())),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 67] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(201, 107, 99, 169, 133, 52, 215, 171),
crate::word(19, 0, 0, 0, 1, 0, 2, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(1, 0, 7, 0, 0, 0, 2, 0),
crate::word(4, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 202, 0, 0, 0),
crate::word(33, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 66, 114, 97),
crate::word(110, 100, 46, 83, 99, 111, 112, 101),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 0, 0, 0, 3, 0, 1, 0),
crate::word(76, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(68, 0, 0, 0, 3, 0, 1, 0),
crate::word(96, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 254, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(93, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(88, 0, 0, 0, 3, 0, 1, 0),
crate::word(100, 0, 0, 0, 2, 0, 1, 0),
crate::word(115, 99, 111, 112, 101, 73, 100, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 105, 110, 100, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(252, 231, 158, 150, 22, 205, 99, 200),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 104, 101, 114, 105, 116, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::struct_list::Owned<crate::schema_capnp::brand::binding::Owned> as crate::introspect::Introspect>::introspect(),
2 => <() as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[1, 2];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 2, 0];
pub const TYPE_ID: u64 = 0xabd7_3485_a963_6bc9;
}
pub enum Which<A0> {
Bind(A0),
Inherit(()),
}
pub type WhichReader<'a> = Which<
crate::Result<
crate::struct_list::Reader<'a, crate::schema_capnp::brand::binding::Owned>,
>,
>;
pub type WhichBuilder<'a> = Which<
crate::Result<
crate::struct_list::Builder<'a, crate::schema_capnp::brand::binding::Owned>,
>,
>;
}
pub mod binding {
pub use self::Which::{Type, Unbound};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn has_type(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 1 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Unbound(())),
1 => ::core::result::Result::Ok(Type(
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn set_unbound(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 0);
}
#[inline]
pub fn set_type(
&mut self,
value: crate::schema_capnp::type_::Reader<'_>,
) -> crate::Result<()> {
self.builder.set_data_field::<u16>(0, 1);
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_type(self) -> crate::schema_capnp::type_::Builder<'a> {
self.builder.set_data_field::<u16>(0, 1);
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
0,
)
}
#[inline]
pub fn has_type(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 1 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Unbound(())),
1 => ::core::result::Result::Ok(Type(
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 48] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(252, 231, 158, 150, 22, 205, 99, 200),
crate::word(19, 0, 0, 0, 1, 0, 1, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(1, 0, 7, 0, 0, 0, 2, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 218, 0, 0, 0),
crate::word(33, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 66, 114, 97),
crate::word(110, 100, 46, 66, 105, 110, 100, 105),
crate::word(110, 103, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 254, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(117, 110, 98, 111, 117, 110, 100, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 121, 112, 101, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(96, 204, 249, 225, 237, 120, 115, 208),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <() as crate::introspect::Introspect>::introspect(),
1 => <crate::schema_capnp::type_::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[0, 1];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0];
pub const TYPE_ID: u64 = 0xc863_cd16_969e_e7fc;
}
pub enum Which<A0> {
Unbound(()),
Type(A0),
}
pub type WhichReader<'a> = Which<crate::Result<crate::schema_capnp::type_::Reader<'a>>>;
pub type WhichBuilder<'a> = Which<crate::Result<crate::schema_capnp::type_::Builder<'a>>>;
}
}
pub mod value {
pub use self::Which::{
AnyPointer, Bool, Data, Enum, Float32, Float64, Int16, Int32, Int64, Int8, Interface, List,
Struct, Text, Uint16, Uint32, Uint64, Uint8, Void,
};
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn has_text(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 12 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn has_data(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 13 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn has_list(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 14 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn has_struct(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 16 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn has_any_pointer(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 18 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, crate::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Void(())),
1 => ::core::result::Result::Ok(Bool(self.reader.get_bool_field(16))),
2 => ::core::result::Result::Ok(Int8(self.reader.get_data_field::<i8>(2))),
3 => ::core::result::Result::Ok(Int16(self.reader.get_data_field::<i16>(1))),
4 => ::core::result::Result::Ok(Int32(self.reader.get_data_field::<i32>(1))),
5 => ::core::result::Result::Ok(Int64(self.reader.get_data_field::<i64>(1))),
6 => ::core::result::Result::Ok(Uint8(self.reader.get_data_field::<u8>(2))),
7 => ::core::result::Result::Ok(Uint16(self.reader.get_data_field::<u16>(1))),
8 => ::core::result::Result::Ok(Uint32(self.reader.get_data_field::<u32>(1))),
9 => ::core::result::Result::Ok(Uint64(self.reader.get_data_field::<u64>(1))),
10 => ::core::result::Result::Ok(Float32(self.reader.get_data_field::<f32>(1))),
11 => ::core::result::Result::Ok(Float64(self.reader.get_data_field::<f64>(1))),
12 => ::core::result::Result::Ok(Text(
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
13 => ::core::result::Result::Ok(Data(
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
14 => ::core::result::Result::Ok(List(crate::any_pointer::Reader::new(
self.reader.get_pointer_field(0),
))),
15 => ::core::result::Result::Ok(Enum(self.reader.get_data_field::<u16>(1))),
16 => ::core::result::Result::Ok(Struct(crate::any_pointer::Reader::new(
self.reader.get_pointer_field(0),
))),
17 => ::core::result::Result::Ok(Interface(())),
18 => ::core::result::Result::Ok(AnyPointer(crate::any_pointer::Reader::new(
self.reader.get_pointer_field(0),
))),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 2,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn set_void(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 0);
}
#[inline]
pub fn set_bool(&mut self, value: bool) {
self.builder.set_data_field::<u16>(0, 1);
self.builder.set_bool_field(16, value);
}
#[inline]
pub fn set_int8(&mut self, value: i8) {
self.builder.set_data_field::<u16>(0, 2);
self.builder.set_data_field::<i8>(2, value);
}
#[inline]
pub fn set_int16(&mut self, value: i16) {
self.builder.set_data_field::<u16>(0, 3);
self.builder.set_data_field::<i16>(1, value);
}
#[inline]
pub fn set_int32(&mut self, value: i32) {
self.builder.set_data_field::<u16>(0, 4);
self.builder.set_data_field::<i32>(1, value);
}
#[inline]
pub fn set_int64(&mut self, value: i64) {
self.builder.set_data_field::<u16>(0, 5);
self.builder.set_data_field::<i64>(1, value);
}
#[inline]
pub fn set_uint8(&mut self, value: u8) {
self.builder.set_data_field::<u16>(0, 6);
self.builder.set_data_field::<u8>(2, value);
}
#[inline]
pub fn set_uint16(&mut self, value: u16) {
self.builder.set_data_field::<u16>(0, 7);
self.builder.set_data_field::<u16>(1, value);
}
#[inline]
pub fn set_uint32(&mut self, value: u32) {
self.builder.set_data_field::<u16>(0, 8);
self.builder.set_data_field::<u32>(1, value);
}
#[inline]
pub fn set_uint64(&mut self, value: u64) {
self.builder.set_data_field::<u16>(0, 9);
self.builder.set_data_field::<u64>(1, value);
}
#[inline]
pub fn set_float32(&mut self, value: f32) {
self.builder.set_data_field::<u16>(0, 10);
self.builder.set_data_field::<f32>(1, value);
}
#[inline]
pub fn set_float64(&mut self, value: f64) {
self.builder.set_data_field::<u16>(0, 11);
self.builder.set_data_field::<f64>(1, value);
}
#[inline]
pub fn set_text(&mut self, value: impl crate::traits::SetterInput<crate::text::Owned>) {
self.builder.set_data_field::<u16>(0, 12);
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_text(self, size: u32) -> crate::text::Builder<'a> {
self.builder.set_data_field::<u16>(0, 12);
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_text(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 12 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn set_data(&mut self, value: crate::data::Reader<'_>) {
self.builder.set_data_field::<u16>(0, 13);
self.builder.reborrow().get_pointer_field(0).set_data(value);
}
#[inline]
pub fn init_data(self, size: u32) -> crate::data::Builder<'a> {
self.builder.set_data_field::<u16>(0, 13);
self.builder.get_pointer_field(0).init_data(size)
}
#[inline]
pub fn has_data(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 13 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn init_list(self) -> crate::any_pointer::Builder<'a> {
self.builder.set_data_field::<u16>(0, 14);
let mut result = crate::any_pointer::Builder::new(self.builder.get_pointer_field(0));
result.clear();
result
}
#[inline]
pub fn has_list(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 14 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn set_enum(&mut self, value: u16) {
self.builder.set_data_field::<u16>(0, 15);
self.builder.set_data_field::<u16>(1, value);
}
#[inline]
pub fn init_struct(self) -> crate::any_pointer::Builder<'a> {
self.builder.set_data_field::<u16>(0, 16);
let mut result = crate::any_pointer::Builder::new(self.builder.get_pointer_field(0));
result.clear();
result
}
#[inline]
pub fn has_struct(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 16 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn set_interface(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 17);
}
#[inline]
pub fn init_any_pointer(self) -> crate::any_pointer::Builder<'a> {
self.builder.set_data_field::<u16>(0, 18);
let mut result = crate::any_pointer::Builder::new(self.builder.get_pointer_field(0));
result.clear();
result
}
#[inline]
pub fn has_any_pointer(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 18 {
return false;
}
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, crate::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Void(())),
1 => ::core::result::Result::Ok(Bool(self.builder.get_bool_field(16))),
2 => ::core::result::Result::Ok(Int8(self.builder.get_data_field::<i8>(2))),
3 => ::core::result::Result::Ok(Int16(self.builder.get_data_field::<i16>(1))),
4 => ::core::result::Result::Ok(Int32(self.builder.get_data_field::<i32>(1))),
5 => ::core::result::Result::Ok(Int64(self.builder.get_data_field::<i64>(1))),
6 => ::core::result::Result::Ok(Uint8(self.builder.get_data_field::<u8>(2))),
7 => ::core::result::Result::Ok(Uint16(self.builder.get_data_field::<u16>(1))),
8 => ::core::result::Result::Ok(Uint32(self.builder.get_data_field::<u32>(1))),
9 => ::core::result::Result::Ok(Uint64(self.builder.get_data_field::<u64>(1))),
10 => ::core::result::Result::Ok(Float32(self.builder.get_data_field::<f32>(1))),
11 => ::core::result::Result::Ok(Float64(self.builder.get_data_field::<f64>(1))),
12 => ::core::result::Result::Ok(Text(
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
13 => ::core::result::Result::Ok(Data(
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
14 => ::core::result::Result::Ok(List(crate::any_pointer::Builder::new(
self.builder.get_pointer_field(0),
))),
15 => ::core::result::Result::Ok(Enum(self.builder.get_data_field::<u16>(1))),
16 => ::core::result::Result::Ok(Struct(crate::any_pointer::Builder::new(
self.builder.get_pointer_field(0),
))),
17 => ::core::result::Result::Ok(Interface(())),
18 => ::core::result::Result::Ok(AnyPointer(crate::any_pointer::Builder::new(
self.builder.get_pointer_field(0),
))),
x => ::core::result::Result::Err(crate::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 304] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(155, 12, 176, 215, 210, 220, 35, 206),
crate::word(13, 0, 0, 0, 1, 0, 2, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(1, 0, 7, 0, 0, 0, 19, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 154, 0, 0, 0),
crate::word(29, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 47, 4, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 86, 97, 108),
crate::word(117, 101, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(76, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 255, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(5, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 2, 0, 0, 3, 0, 1, 0),
crate::word(12, 2, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 254, 255, 16, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 2, 0, 0, 3, 0, 1, 0),
crate::word(16, 2, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 253, 255, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 2, 0, 0, 3, 0, 1, 0),
crate::word(20, 2, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 252, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 3, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(17, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 2, 0, 0, 3, 0, 1, 0),
crate::word(24, 2, 0, 0, 2, 0, 1, 0),
crate::word(4, 0, 251, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 4, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 2, 0, 0, 3, 0, 1, 0),
crate::word(28, 2, 0, 0, 2, 0, 1, 0),
crate::word(5, 0, 250, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 5, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(20, 2, 0, 0, 3, 0, 1, 0),
crate::word(32, 2, 0, 0, 2, 0, 1, 0),
crate::word(6, 0, 249, 255, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 6, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 2, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(24, 2, 0, 0, 3, 0, 1, 0),
crate::word(36, 2, 0, 0, 2, 0, 1, 0),
crate::word(7, 0, 248, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(33, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(28, 2, 0, 0, 3, 0, 1, 0),
crate::word(40, 2, 0, 0, 2, 0, 1, 0),
crate::word(8, 0, 247, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 8, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(37, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(32, 2, 0, 0, 3, 0, 1, 0),
crate::word(44, 2, 0, 0, 2, 0, 1, 0),
crate::word(9, 0, 246, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 9, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 2, 0, 0, 3, 0, 1, 0),
crate::word(48, 2, 0, 0, 2, 0, 1, 0),
crate::word(10, 0, 245, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 10, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 2, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 2, 0, 0, 3, 0, 1, 0),
crate::word(52, 2, 0, 0, 2, 0, 1, 0),
crate::word(11, 0, 244, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 11, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(49, 2, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(44, 2, 0, 0, 3, 0, 1, 0),
crate::word(56, 2, 0, 0, 2, 0, 1, 0),
crate::word(12, 0, 243, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 12, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(53, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(48, 2, 0, 0, 3, 0, 1, 0),
crate::word(60, 2, 0, 0, 2, 0, 1, 0),
crate::word(13, 0, 242, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 13, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(57, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(52, 2, 0, 0, 3, 0, 1, 0),
crate::word(64, 2, 0, 0, 2, 0, 1, 0),
crate::word(14, 0, 241, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 14, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(61, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(56, 2, 0, 0, 3, 0, 1, 0),
crate::word(68, 2, 0, 0, 2, 0, 1, 0),
crate::word(15, 0, 240, 255, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 15, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(65, 2, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(60, 2, 0, 0, 3, 0, 1, 0),
crate::word(72, 2, 0, 0, 2, 0, 1, 0),
crate::word(16, 0, 239, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 16, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 2, 0, 0, 58, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 2, 0, 0, 3, 0, 1, 0),
crate::word(76, 2, 0, 0, 2, 0, 1, 0),
crate::word(17, 0, 238, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 17, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 2, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(72, 2, 0, 0, 3, 0, 1, 0),
crate::word(84, 2, 0, 0, 2, 0, 1, 0),
crate::word(18, 0, 237, 255, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 18, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(81, 2, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(80, 2, 0, 0, 3, 0, 1, 0),
crate::word(92, 2, 0, 0, 2, 0, 1, 0),
crate::word(118, 111, 105, 100, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 111, 111, 108, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 56, 0, 0, 0, 0),
crate::word(2, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(2, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 49, 54, 0, 0, 0),
crate::word(3, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(3, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 51, 50, 0, 0, 0),
crate::word(4, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 54, 52, 0, 0, 0),
crate::word(5, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(5, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 56, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 49, 54, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 51, 50, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(8, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 105, 110, 116, 54, 52, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 108, 111, 97, 116, 51, 50, 0),
crate::word(10, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(10, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 108, 111, 97, 116, 54, 52, 0),
crate::word(11, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(11, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 101, 120, 116, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(100, 97, 116, 97, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(13, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(108, 105, 115, 116, 0, 0, 0, 0),
crate::word(18, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(18, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(101, 110, 117, 109, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 116, 114, 117, 99, 116, 0, 0),
crate::word(18, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(18, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 110, 116, 101, 114, 102, 97, 99),
crate::word(101, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 110, 121, 80, 111, 105, 110, 116),
crate::word(101, 114, 0, 0, 0, 0, 0, 0),
crate::word(18, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(18, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <() as crate::introspect::Introspect>::introspect(),
1 => <bool as crate::introspect::Introspect>::introspect(),
2 => <i8 as crate::introspect::Introspect>::introspect(),
3 => <i16 as crate::introspect::Introspect>::introspect(),
4 => <i32 as crate::introspect::Introspect>::introspect(),
5 => <i64 as crate::introspect::Introspect>::introspect(),
6 => <u8 as crate::introspect::Introspect>::introspect(),
7 => <u16 as crate::introspect::Introspect>::introspect(),
8 => <u32 as crate::introspect::Introspect>::introspect(),
9 => <u64 as crate::introspect::Introspect>::introspect(),
10 => <f32 as crate::introspect::Introspect>::introspect(),
11 => <f64 as crate::introspect::Introspect>::introspect(),
12 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
13 => <crate::data::Owned as crate::introspect::Introspect>::introspect(),
14 => <crate::any_pointer::Owned as crate::introspect::Introspect>::introspect(),
15 => <u16 as crate::introspect::Introspect>::introspect(),
16 => <crate::any_pointer::Owned as crate::introspect::Introspect>::introspect(),
17 => <() as crate::introspect::Introspect>::introspect(),
18 => <crate::any_pointer::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
];
pub static MEMBERS_BY_NAME: &[u16] = &[
18, 1, 13, 15, 10, 11, 3, 4, 5, 2, 17, 14, 16, 12, 7, 8, 9, 6, 0,
];
pub const TYPE_ID: u64 = 0xce23_dcd2_d7b0_0c9b;
}
pub enum Which<A0, A1, A2, A3, A4> {
Void(()),
Bool(bool),
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
Uint8(u8),
Uint16(u16),
Uint32(u32),
Uint64(u64),
Float32(f32),
Float64(f64),
Text(A0),
Data(A1),
List(A2),
Enum(u16),
Struct(A3),
Interface(()),
AnyPointer(A4),
}
pub type WhichReader<'a> = Which<
crate::Result<crate::text::Reader<'a>>,
crate::Result<crate::data::Reader<'a>>,
crate::any_pointer::Reader<'a>,
crate::any_pointer::Reader<'a>,
crate::any_pointer::Reader<'a>,
>;
pub type WhichBuilder<'a> = Which<
crate::Result<crate::text::Builder<'a>>,
crate::Result<crate::data::Builder<'a>>,
crate::any_pointer::Builder<'a>,
crate::any_pointer::Builder<'a>,
crate::any_pointer::Builder<'a>,
>;
}
pub mod annotation {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_value(self) -> crate::Result<crate::schema_capnp::value::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_value(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 2,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_value(self) -> crate::Result<crate::schema_capnp::value::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_value(
&mut self,
value: crate::schema_capnp::value::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_value(self) -> crate::schema_capnp::value::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
#[inline]
pub fn has_value(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_brand(self) -> crate::Result<crate::schema_capnp::brand::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_brand(
&mut self,
value: crate::schema_capnp::brand::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_brand(self) -> crate::schema_capnp::brand::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), 0)
}
#[inline]
pub fn has_brand(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_value(&self) -> crate::schema_capnp::value::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
pub fn get_brand(&self) -> crate::schema_capnp::brand::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(1))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 62] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(66, 117, 37, 171, 13, 149, 200, 241),
crate::word(13, 0, 0, 0, 1, 0, 1, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(2, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 194, 0, 0, 0),
crate::word(29, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(25, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 65, 110, 110),
crate::word(111, 116, 97, 116, 105, 111, 110, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 0, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 0, 0, 0, 3, 0, 1, 0),
crate::word(76, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(68, 0, 0, 0, 3, 0, 1, 0),
crate::word(80, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(77, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(72, 0, 0, 0, 3, 0, 1, 0),
crate::word(84, 0, 0, 0, 2, 0, 1, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(118, 97, 108, 117, 101, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(155, 12, 176, 215, 210, 220, 35, 206),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 114, 97, 110, 100, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(43, 66, 101, 96, 240, 85, 52, 144),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => {
<crate::schema_capnp::value::Owned as crate::introspect::Introspect>::introspect(
)
}
2 => {
<crate::schema_capnp::brand::Owned as crate::introspect::Introspect>::introspect(
)
}
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[2, 0, 1];
pub const TYPE_ID: u64 = 0xf1c8_950d_ab25_7542;
}
}
#[repr(u16)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ElementSize {
Empty = 0,
Bit = 1,
Byte = 2,
TwoBytes = 3,
FourBytes = 4,
EightBytes = 5,
Pointer = 6,
InlineComposite = 7,
}
impl crate::introspect::Introspect for ElementSize {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Enum(crate::introspect::RawEnumSchema {
encoded_node: &element_size::ENCODED_NODE,
annotation_types: element_size::get_annotation_types,
})
.into()
}
}
impl<'a> ::core::convert::From<ElementSize> for crate::dynamic_value::Reader<'a> {
fn from(e: ElementSize) -> Self {
crate::dynamic_value::Enum::new(
e.into(),
crate::introspect::RawEnumSchema {
encoded_node: &element_size::ENCODED_NODE,
annotation_types: element_size::get_annotation_types,
}
.into(),
)
.into()
}
}
impl ::core::convert::TryFrom<u16> for ElementSize {
type Error = crate::NotInSchema;
fn try_from(
value: u16,
) -> ::core::result::Result<Self, <ElementSize as ::core::convert::TryFrom<u16>>::Error> {
match value {
0 => ::core::result::Result::Ok(Self::Empty),
1 => ::core::result::Result::Ok(Self::Bit),
2 => ::core::result::Result::Ok(Self::Byte),
3 => ::core::result::Result::Ok(Self::TwoBytes),
4 => ::core::result::Result::Ok(Self::FourBytes),
5 => ::core::result::Result::Ok(Self::EightBytes),
6 => ::core::result::Result::Ok(Self::Pointer),
7 => ::core::result::Result::Ok(Self::InlineComposite),
n => ::core::result::Result::Err(crate::NotInSchema(n)),
}
}
}
impl From<ElementSize> for u16 {
#[inline]
fn from(x: ElementSize) -> u16 {
x as u16
}
}
impl crate::traits::HasTypeId for ElementSize {
const TYPE_ID: u64 = 0xd195_8f7d_ba52_1926u64;
}
mod element_size {
pub static ENCODED_NODE: [crate::Word; 54] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(38, 25, 82, 186, 125, 143, 149, 209),
crate::word(13, 0, 0, 0, 2, 0, 0, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 202, 0, 0, 0),
crate::word(33, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 199, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 69, 108, 101),
crate::word(109, 101, 110, 116, 83, 105, 122, 101),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(32, 0, 0, 0, 1, 0, 2, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(89, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(81, 0, 0, 0, 34, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(2, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(3, 0, 0, 0, 0, 0, 0, 0),
crate::word(65, 0, 0, 0, 74, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 0, 0, 0, 0),
crate::word(61, 0, 0, 0, 82, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(5, 0, 0, 0, 0, 0, 0, 0),
crate::word(57, 0, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(53, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 130, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(101, 109, 112, 116, 121, 0, 0, 0),
crate::word(98, 105, 116, 0, 0, 0, 0, 0),
crate::word(98, 121, 116, 101, 0, 0, 0, 0),
crate::word(116, 119, 111, 66, 121, 116, 101, 115),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 111, 117, 114, 66, 121, 116, 101),
crate::word(115, 0, 0, 0, 0, 0, 0, 0),
crate::word(101, 105, 103, 104, 116, 66, 121, 116),
crate::word(101, 115, 0, 0, 0, 0, 0, 0),
crate::word(112, 111, 105, 110, 116, 101, 114, 0),
crate::word(105, 110, 108, 105, 110, 101, 67, 111),
crate::word(109, 112, 111, 115, 105, 116, 101, 0),
];
pub fn get_annotation_types(child_index: Option<u16>, index: u32) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
}
pub mod capnp_version {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_major(self) -> u16 {
self.reader.get_data_field::<u16>(0)
}
#[inline]
pub fn get_minor(self) -> u8 {
self.reader.get_data_field::<u8>(2)
}
#[inline]
pub fn get_micro(self) -> u8 {
self.reader.get_data_field::<u8>(3)
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 0,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_major(self) -> u16 {
self.builder.get_data_field::<u16>(0)
}
#[inline]
pub fn set_major(&mut self, value: u16) {
self.builder.set_data_field::<u16>(0, value);
}
#[inline]
pub fn get_minor(self) -> u8 {
self.builder.get_data_field::<u8>(2)
}
#[inline]
pub fn set_minor(&mut self, value: u8) {
self.builder.set_data_field::<u8>(2, value);
}
#[inline]
pub fn get_micro(self) -> u8 {
self.builder.get_data_field::<u8>(3)
}
#[inline]
pub fn set_micro(&mut self, value: u8) {
self.builder.set_data_field::<u8>(3, value);
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 63] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(99, 153, 131, 125, 91, 48, 93, 216),
crate::word(13, 0, 0, 0, 1, 0, 1, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(0, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 210, 0, 0, 0),
crate::word(33, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(29, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 67, 97, 112),
crate::word(110, 112, 86, 101, 114, 115, 105, 111),
crate::word(110, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 0, 0, 0, 3, 0, 1, 0),
crate::word(76, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(68, 0, 0, 0, 3, 0, 1, 0),
crate::word(80, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(77, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(72, 0, 0, 0, 3, 0, 1, 0),
crate::word(84, 0, 0, 0, 2, 0, 1, 0),
crate::word(109, 97, 106, 111, 114, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(7, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(109, 105, 110, 111, 114, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(109, 105, 99, 114, 111, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(6, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u16 as crate::introspect::Introspect>::introspect(),
1 => <u8 as crate::introspect::Introspect>::introspect(),
2 => <u8 as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0, 2, 1];
pub const TYPE_ID: u64 = 0xd85d_305b_7d83_9963;
}
}
pub mod code_generator_request {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_nodes(
self,
) -> crate::Result<crate::struct_list::Reader<'a, crate::schema_capnp::node::Owned>>
{
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_nodes(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_requested_files(
self,
) -> crate::Result<
crate::struct_list::Reader<
'a,
crate::schema_capnp::code_generator_request::requested_file::Owned,
>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_requested_files(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_capnp_version(
self,
) -> crate::Result<crate::schema_capnp::capnp_version::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn has_capnp_version(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
#[inline]
pub fn get_source_info(
self,
) -> crate::Result<
crate::struct_list::Reader<'a, crate::schema_capnp::node::source_info::Owned>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn has_source_info(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 0,
pointers: 4,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(builder: crate::private::layout::PointerBuilder<'a>, _size: u32) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_nodes(
self,
) -> crate::Result<crate::struct_list::Builder<'a, crate::schema_capnp::node::Owned>>
{
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_nodes(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::node::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_nodes(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::node::Owned> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), size)
}
#[inline]
pub fn has_nodes(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_requested_files(
self,
) -> crate::Result<
crate::struct_list::Builder<
'a,
crate::schema_capnp::code_generator_request::requested_file::Owned,
>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_requested_files(
&mut self,
value: crate::struct_list::Reader<
'_,
crate::schema_capnp::code_generator_request::requested_file::Owned,
>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_requested_files(
self,
size: u32,
) -> crate::struct_list::Builder<
'a,
crate::schema_capnp::code_generator_request::requested_file::Owned,
> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), size)
}
#[inline]
pub fn has_requested_files(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
#[inline]
pub fn get_capnp_version(
self,
) -> crate::Result<crate::schema_capnp::capnp_version::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_capnp_version(
&mut self,
value: crate::schema_capnp::capnp_version::Reader<'_>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(2),
value,
false,
)
}
#[inline]
pub fn init_capnp_version(self) -> crate::schema_capnp::capnp_version::Builder<'a> {
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(2), 0)
}
#[inline]
pub fn has_capnp_version(&self) -> bool {
!self.builder.is_pointer_field_null(2)
}
#[inline]
pub fn get_source_info(
self,
) -> crate::Result<
crate::struct_list::Builder<'a, crate::schema_capnp::node::source_info::Owned>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_source_info(
&mut self,
value: crate::struct_list::Reader<'_, crate::schema_capnp::node::source_info::Owned>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_source_info(
self,
size: u32,
) -> crate::struct_list::Builder<'a, crate::schema_capnp::node::source_info::Owned>
{
crate::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(3), size)
}
#[inline]
pub fn has_source_info(&self) -> bool {
!self.builder.is_pointer_field_null(3)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_capnp_version(&self) -> crate::schema_capnp::capnp_version::Pipeline {
crate::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(2))
}
}
mod _private {
pub static ENCODED_NODE: [crate::Word; 98] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(206, 215, 10, 33, 246, 70, 197, 191),
crate::word(13, 0, 0, 0, 1, 0, 0, 0),
crate::word(217, 114, 76, 98, 9, 197, 63, 169),
crate::word(4, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 18, 1, 0, 0),
crate::word(37, 0, 0, 0, 23, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(49, 0, 0, 0, 231, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 67, 111, 100),
crate::word(101, 71, 101, 110, 101, 114, 97, 116),
crate::word(111, 114, 82, 101, 113, 117, 101, 115),
crate::word(116, 0, 0, 0, 0, 0, 0, 0),
crate::word(4, 0, 0, 0, 1, 0, 1, 0),
crate::word(98, 0, 129, 46, 176, 14, 234, 207),
crate::word(1, 0, 0, 0, 114, 0, 0, 0),
crate::word(82, 101, 113, 117, 101, 115, 116, 101),
crate::word(100, 70, 105, 108, 101, 0, 0, 0),
crate::word(16, 0, 0, 0, 3, 0, 4, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(97, 0, 0, 0, 50, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(92, 0, 0, 0, 3, 0, 1, 0),
crate::word(120, 0, 0, 0, 2, 0, 1, 0),
crate::word(3, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(117, 0, 0, 0, 122, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(116, 0, 0, 0, 3, 0, 1, 0),
crate::word(144, 0, 0, 0, 2, 0, 1, 0),
crate::word(0, 0, 0, 0, 2, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(141, 0, 0, 0, 106, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(140, 0, 0, 0, 3, 0, 1, 0),
crate::word(152, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 3, 0, 0, 0),
crate::word(0, 0, 1, 0, 3, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(149, 0, 0, 0, 90, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(148, 0, 0, 0, 3, 0, 1, 0),
crate::word(176, 0, 0, 0, 2, 0, 1, 0),
crate::word(110, 111, 100, 101, 115, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(23, 164, 35, 249, 76, 171, 130, 230),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(114, 101, 113, 117, 101, 115, 116, 101),
crate::word(100, 70, 105, 108, 101, 115, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(98, 0, 129, 46, 176, 14, 234, 207),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 97, 112, 110, 112, 86, 101, 114),
crate::word(115, 105, 111, 110, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(99, 153, 131, 125, 91, 48, 93, 216),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 111, 117, 114, 99, 101, 73, 110),
crate::word(102, 111, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(174, 87, 19, 4, 227, 29, 142, 243),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <crate::struct_list::Owned<crate::schema_capnp::node::Owned> as crate::introspect::Introspect>::introspect(),
1 => <crate::struct_list::Owned<crate::schema_capnp::code_generator_request::requested_file::Owned> as crate::introspect::Introspect>::introspect(),
2 => <crate::schema_capnp::capnp_version::Owned as crate::introspect::Introspect>::introspect(),
3 => <crate::struct_list::Owned<crate::schema_capnp::node::source_info::Owned> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2, 3];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[2, 0, 1, 3];
pub const TYPE_ID: u64 = 0xbfc5_46f6_210a_d7ce;
}
pub mod requested_file {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
})
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_filename(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_filename(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_imports(
self,
) -> crate::Result<
crate::struct_list::Reader<
'a,
crate::schema_capnp::code_generator_request::requested_file::import::Owned,
>,
> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn has_imports(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 2,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
}),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE, default)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_filename(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_filename(
&mut self,
value: impl crate::traits::SetterInput<crate::text::Owned>,
) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_filename(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_filename(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
#[inline]
pub fn get_imports(
self,
) -> crate::Result<
crate::struct_list::Builder<
'a,
crate::schema_capnp::code_generator_request::requested_file::import::Owned,
>,
> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_imports(
&mut self,
value: crate::struct_list::Reader<
'_,
crate::schema_capnp::code_generator_request::requested_file::import::Owned,
>,
) -> crate::Result<()> {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_imports(
self,
size: u32,
) -> crate::struct_list::Builder<
'a,
crate::schema_capnp::code_generator_request::requested_file::import::Owned,
> {
crate::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(1),
size,
)
}
#[inline]
pub fn has_imports(&self) -> bool {
!self.builder.is_pointer_field_null(1)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 73] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(98, 0, 129, 46, 176, 14, 234, 207),
crate::word(34, 0, 0, 0, 1, 0, 1, 0),
crate::word(206, 215, 10, 33, 246, 70, 197, 191),
crate::word(2, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 130, 1, 0, 0),
crate::word(41, 0, 0, 0, 23, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(49, 0, 0, 0, 175, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 67, 111, 100),
crate::word(101, 71, 101, 110, 101, 114, 97, 116),
crate::word(111, 114, 82, 101, 113, 117, 101, 115),
crate::word(116, 46, 82, 101, 113, 117, 101, 115),
crate::word(116, 101, 100, 70, 105, 108, 101, 0),
crate::word(4, 0, 0, 0, 1, 0, 1, 0),
crate::word(229, 87, 35, 18, 147, 65, 80, 174),
crate::word(1, 0, 0, 0, 58, 0, 0, 0),
crate::word(73, 109, 112, 111, 114, 116, 0, 0),
crate::word(12, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(69, 0, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(64, 0, 0, 0, 3, 0, 1, 0),
crate::word(76, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(73, 0, 0, 0, 74, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(72, 0, 0, 0, 3, 0, 1, 0),
crate::word(84, 0, 0, 0, 2, 0, 1, 0),
crate::word(2, 0, 0, 0, 1, 0, 0, 0),
crate::word(0, 0, 1, 0, 2, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(81, 0, 0, 0, 66, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(76, 0, 0, 0, 3, 0, 1, 0),
crate::word(104, 0, 0, 0, 2, 0, 1, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(102, 105, 108, 101, 110, 97, 109, 101),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(105, 109, 112, 111, 114, 116, 115, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 3, 0, 1, 0),
crate::word(16, 0, 0, 0, 0, 0, 0, 0),
crate::word(229, 87, 35, 18, 147, 65, 80, 174),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(14, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
2 => <crate::struct_list::Owned<
crate::schema_capnp::code_generator_request::requested_file::import::Owned,
> as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1, 2];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[1, 0, 2];
pub const TYPE_ID: u64 = 0xcfea_0eb0_2e81_0062;
}
pub mod import {
#[derive(Copy, Clone)]
pub struct Owned(());
impl crate::introspect::Introspect for Owned {
fn introspect() -> crate::introspect::Type {
crate::introspect::TypeVariant::Struct(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
)
.into()
}
}
impl crate::traits::Owned for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::OwnedStruct for Owned {
type Reader<'a> = Reader<'a>;
type Builder<'a> = Builder<'a>;
}
impl crate::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
pub struct Reader<'a> {
reader: crate::private::layout::StructReader<'a>,
}
impl<'a> ::core::marker::Copy for Reader<'a> {}
impl<'a> ::core::clone::Clone for Reader<'a> {
fn clone(&self) -> Self {
*self
}
}
impl<'a> crate::traits::HasTypeId for Reader<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructReader<'a>> for Reader<'a> {
fn from(reader: crate::private::layout::StructReader<'a>) -> Self {
Self { reader }
}
}
impl<'a> ::core::convert::From<Reader<'a>> for crate::dynamic_value::Reader<'a> {
fn from(reader: Reader<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Reader::new(
reader.reader,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> ::core::fmt::Debug for Reader<'a> {
fn fmt(
&self,
f: &mut ::core::fmt::Formatter<'_>,
) -> ::core::result::Result<(), ::core::fmt::Error> {
core::fmt::Debug::fmt(
&::core::convert::Into::<crate::dynamic_value::Reader<'_>>::into(*self),
f,
)
}
}
impl<'a> crate::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &crate::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(reader.get_struct(default)?.into())
}
}
impl<'a> crate::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> crate::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> crate::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a crate::private::layout::CapTable) {
self.reader
.imbue(crate::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Self { ..*self }
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Reader<'a>> {
crate::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a> {
builder: crate::private::layout::StructBuilder<'a>,
}
impl<'a> crate::traits::HasStructSize for Builder<'a> {
const STRUCT_SIZE: crate::private::layout::StructSize =
crate::private::layout::StructSize {
data: 1,
pointers: 1,
};
}
impl<'a> crate::traits::HasTypeId for Builder<'a> {
const TYPE_ID: u64 = _private::TYPE_ID;
}
impl<'a> ::core::convert::From<crate::private::layout::StructBuilder<'a>> for Builder<'a> {
fn from(builder: crate::private::layout::StructBuilder<'a>) -> Self {
Self { builder }
}
}
impl<'a> ::core::convert::From<Builder<'a>> for crate::dynamic_value::Builder<'a> {
fn from(builder: Builder<'a>) -> Self {
Self::Struct(crate::dynamic_struct::Builder::new(
builder.builder,
crate::schema::StructSchema::new(
crate::introspect::RawBrandedStructSchema {
generic: &_private::RAW_SCHEMA,
field_types: _private::get_field_types,
annotation_types: _private::get_annotation_types,
},
),
))
}
}
impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut crate::private::layout::CapTable) {
self.builder
.imbue(crate::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> crate::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Self {
builder
.init_struct(<Self as crate::traits::HasStructSize>::STRUCT_SIZE)
.into()
}
fn get_from_pointer(
builder: crate::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [crate::Word]>,
) -> crate::Result<Self> {
::core::result::Result::Ok(
builder
.get_struct(
<Self as crate::traits::HasStructSize>::STRUCT_SIZE,
default,
)?
.into(),
)
}
}
impl<'a> crate::traits::SetterInput<Owned> for Reader<'a> {
fn set_pointer_builder(
mut pointer: crate::private::layout::PointerBuilder<'_>,
value: Self,
canonicalize: bool,
) -> crate::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
self.builder.into_reader().into()
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder {
builder: self.builder.reborrow(),
}
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
self.builder.as_reader().into()
}
pub fn total_size(&self) -> crate::Result<crate::MessageSize> {
self.builder.as_reader().total_size()
}
#[inline]
pub fn get_id(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_id(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_name(self) -> crate::Result<crate::text::Builder<'a>> {
crate::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(
&mut self,
value: impl crate::traits::SetterInput<crate::text::Owned>,
) {
crate::traits::SetterInput::set_pointer_builder(
self.builder.reborrow().get_pointer_field(0),
value,
false,
)
.unwrap()
}
#[inline]
pub fn init_name(self, size: u32) -> crate::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
#[inline]
pub fn has_name(&self) -> bool {
!self.builder.is_pointer_field_null(0)
}
}
pub struct Pipeline {
_typeless: crate::any_pointer::Pipeline,
}
impl crate::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: crate::any_pointer::Pipeline) -> Self {
Self {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
pub static ENCODED_NODE: [crate::Word; 51] = [
crate::word(0, 0, 0, 0, 5, 0, 6, 0),
crate::word(229, 87, 35, 18, 147, 65, 80, 174),
crate::word(48, 0, 0, 0, 1, 0, 1, 0),
crate::word(98, 0, 129, 46, 176, 14, 234, 207),
crate::word(1, 0, 7, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(21, 0, 0, 0, 186, 1, 0, 0),
crate::word(45, 0, 0, 0, 7, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 119, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(115, 99, 104, 101, 109, 97, 46, 99),
crate::word(97, 112, 110, 112, 58, 67, 111, 100),
crate::word(101, 71, 101, 110, 101, 114, 97, 116),
crate::word(111, 114, 82, 101, 113, 117, 101, 115),
crate::word(116, 46, 82, 101, 113, 117, 101, 115),
crate::word(116, 101, 100, 70, 105, 108, 101, 46),
crate::word(73, 109, 112, 111, 114, 116, 0, 0),
crate::word(0, 0, 0, 0, 1, 0, 1, 0),
crate::word(8, 0, 0, 0, 3, 0, 4, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(41, 0, 0, 0, 26, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(36, 0, 0, 0, 3, 0, 1, 0),
crate::word(48, 0, 0, 0, 2, 0, 1, 0),
crate::word(1, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 1, 0, 1, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(45, 0, 0, 0, 42, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(40, 0, 0, 0, 3, 0, 1, 0),
crate::word(52, 0, 0, 0, 2, 0, 1, 0),
crate::word(105, 100, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(9, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(110, 97, 109, 101, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(12, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
crate::word(0, 0, 0, 0, 0, 0, 0, 0),
];
pub fn get_field_types(index: u16) -> crate::introspect::Type {
match index {
0 => <u64 as crate::introspect::Introspect>::introspect(),
1 => <crate::text::Owned as crate::introspect::Introspect>::introspect(),
_ => panic!("invalid field index {}", index),
}
}
pub fn get_annotation_types(
child_index: Option<u16>,
index: u32,
) -> crate::introspect::Type {
panic!("invalid annotation indices ({:?}, {}) ", child_index, index)
}
pub static RAW_SCHEMA: crate::introspect::RawStructSchema =
crate::introspect::RawStructSchema {
encoded_node: &ENCODED_NODE,
nonunion_members: NONUNION_MEMBERS,
members_by_discriminant: MEMBERS_BY_DISCRIMINANT,
members_by_name: MEMBERS_BY_NAME,
};
pub static NONUNION_MEMBERS: &[u16] = &[0, 1];
pub static MEMBERS_BY_DISCRIMINANT: &[u16] = &[];
pub static MEMBERS_BY_NAME: &[u16] = &[0, 1];
pub const TYPE_ID: u64 = 0xae50_4193_1223_57e5;
}
}
}
}