nushell/crates/nu-plugin/src/plugin_capnp.rs
2021-11-01 07:56:10 +00:00

4179 lines
145 KiB
Rust

// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler.
// DO NOT EDIT.
// source: plugin.capnp
pub mod option {
/* T */
pub use self::Which::{None, Some};
#[derive(Copy, Clone)]
pub struct Owned<T> {
_phantom: ::core::marker::PhantomData<T>,
}
impl<'a, T> ::capnp::traits::Owned<'a> for Owned<T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, T>;
type Builder = Builder<'a, T>;
}
impl<'a, T> ::capnp::traits::OwnedStruct<'a> for Owned<T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, T>;
type Builder = Builder<'a, T>;
}
impl<T> ::capnp::traits::Pipelined for Owned<T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
type Pipeline = Pipeline<T>;
}
#[derive(Clone, Copy)]
pub struct Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
reader: ::capnp::private::layout::StructReader<'a>,
_phantom: ::core::marker::PhantomData<T>,
}
impl<'a, T> ::capnp::traits::HasTypeId for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, T> ::capnp::traits::FromStructReader<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a, T> {
Reader {
reader,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, T> ::capnp::traits::FromPointerReader<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a, T>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a, T> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a, T> ::capnp::traits::Imbue<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a, T> Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn reborrow(&self) -> Reader<'_, T> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
pub fn has_some(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 1 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a, T>, ::capnp::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(None(())),
1 => ::core::result::Result::Ok(Some(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
builder: ::capnp::private::layout::StructBuilder<'a>,
_phantom: ::core::marker::PhantomData<T>,
}
impl<'a, T> ::capnp::traits::HasStructSize for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a, T> ::capnp::traits::HasTypeId for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, T> ::capnp::traits::FromStructBuilder<'a> for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, T> {
Builder {
builder,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, T> ::capnp::traits::ImbueMut<'a> for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a, T> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a, T> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a, T>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a, T> ::capnp::traits::SetPointerBuilder for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a, T>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a, T> Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn into_reader(self) -> Reader<'a, T> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_, T> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_, T> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn set_none(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 0);
}
#[inline]
pub fn initn_some(self, length: u32) -> <T as ::capnp::traits::Owned<'a>>::Builder {
self.builder.set_data_field::<u16>(0, 1);
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).initn_as(length)
}
#[inline]
pub fn set_some(
&mut self,
value: <T as ::capnp::traits::Owned<'_>>::Reader,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 1);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_some(self) -> <T as ::capnp::traits::Owned<'a>>::Builder {
self.builder.set_data_field::<u16>(0, 1);
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).init_as()
}
pub fn has_some(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 1 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a, T>, ::capnp::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(None(())),
1 => ::core::result::Result::Ok(Some(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Pipeline<T> {
_typeless: ::capnp::any_pointer::Pipeline,
_phantom: ::core::marker::PhantomData<T>,
}
impl<T> ::capnp::capability::FromTypelessPipeline for Pipeline<T> {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline<T> {
Pipeline {
_typeless: typeless,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<T> Pipeline<T>
where
T: ::capnp::traits::Pipelined,
<T as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline,
{
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 1,
};
pub const TYPE_ID: u64 = 0xd0d8_5bbb_e991_4dd9;
}
pub enum Which<A0> {
None(()),
Some(A0),
}
pub type WhichReader<'a, T> = Which<::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Reader>>;
pub type WhichBuilder<'a, T> =
Which<::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Builder>>;
}
pub mod err {
/* T */
pub use self::Which::{Err, Ok};
#[derive(Copy, Clone)]
pub struct Owned<T> {
_phantom: ::core::marker::PhantomData<T>,
}
impl<'a, T> ::capnp::traits::Owned<'a> for Owned<T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, T>;
type Builder = Builder<'a, T>;
}
impl<'a, T> ::capnp::traits::OwnedStruct<'a> for Owned<T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, T>;
type Builder = Builder<'a, T>;
}
impl<T> ::capnp::traits::Pipelined for Owned<T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
type Pipeline = Pipeline<T>;
}
#[derive(Clone, Copy)]
pub struct Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
reader: ::capnp::private::layout::StructReader<'a>,
_phantom: ::core::marker::PhantomData<T>,
}
impl<'a, T> ::capnp::traits::HasTypeId for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, T> ::capnp::traits::FromStructReader<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a, T> {
Reader {
reader,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, T> ::capnp::traits::FromPointerReader<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a, T>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a, T> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a, T> ::capnp::traits::Imbue<'a> for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a, T> Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn reborrow(&self) -> Reader<'_, T> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
pub fn has_err(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 0 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
pub fn has_ok(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 1 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a, T>, ::capnp::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Err(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
1 => ::core::result::Result::Ok(Ok(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
builder: ::capnp::private::layout::StructBuilder<'a>,
_phantom: ::core::marker::PhantomData<T>,
}
impl<'a, T> ::capnp::traits::HasStructSize for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a, T> ::capnp::traits::HasTypeId for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, T> ::capnp::traits::FromStructBuilder<'a> for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, T> {
Builder {
builder,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, T> ::capnp::traits::ImbueMut<'a> for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a, T> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a, T> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a, T>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a, T> ::capnp::traits::SetPointerBuilder for Reader<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a, T>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a, T> Builder<'a, T>
where
T: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn into_reader(self) -> Reader<'a, T> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_, T> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_, T> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn set_err(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.set_data_field::<u16>(0, 0);
self.builder.get_pointer_field(0).set_text(value);
}
#[inline]
pub fn init_err(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.set_data_field::<u16>(0, 0);
self.builder.get_pointer_field(0).init_text(size)
}
pub fn has_err(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 0 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn initn_ok(self, length: u32) -> <T as ::capnp::traits::Owned<'a>>::Builder {
self.builder.set_data_field::<u16>(0, 1);
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).initn_as(length)
}
#[inline]
pub fn set_ok(
&mut self,
value: <T as ::capnp::traits::Owned<'_>>::Reader,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 1);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_ok(self) -> <T as ::capnp::traits::Owned<'a>>::Builder {
self.builder.set_data_field::<u16>(0, 1);
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).init_as()
}
pub fn has_ok(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 1 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a, T>, ::capnp::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Err(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
1 => ::core::result::Result::Ok(Ok(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Pipeline<T> {
_typeless: ::capnp::any_pointer::Pipeline,
_phantom: ::core::marker::PhantomData<T>,
}
impl<T> ::capnp::capability::FromTypelessPipeline for Pipeline<T> {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline<T> {
Pipeline {
_typeless: typeless,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<T> Pipeline<T>
where
T: ::capnp::traits::Pipelined,
<T as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline,
{
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 1,
};
pub const TYPE_ID: u64 = 0xaed6_5bd3_8214_33f8;
}
pub enum Which<A0, A1> {
Err(A0),
Ok(A1),
}
pub type WhichReader<'a, T> = Which<
::capnp::Result<::capnp::text::Reader<'a>>,
::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Reader>,
>;
pub type WhichBuilder<'a, T> = Which<
::capnp::Result<::capnp::text::Builder<'a>>,
::capnp::Result<<T as ::capnp::traits::Owned<'a>>::Builder>,
>;
}
pub mod map {
/* Key,Value */
#[derive(Copy, Clone)]
pub struct Owned<Key, Value> {
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<'a, Key, Value> ::capnp::traits::Owned<'a> for Owned<Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, Key, Value>;
type Builder = Builder<'a, Key, Value>;
}
impl<'a, Key, Value> ::capnp::traits::OwnedStruct<'a> for Owned<Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, Key, Value>;
type Builder = Builder<'a, Key, Value>;
}
impl<Key, Value> ::capnp::traits::Pipelined for Owned<Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
type Pipeline = Pipeline<Key, Value>;
}
#[derive(Clone, Copy)]
pub struct Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
reader: ::capnp::private::layout::StructReader<'a>,
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<'a, Key, Value> ::capnp::traits::HasTypeId for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, Key, Value> ::capnp::traits::FromStructReader<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a, Key, Value> {
Reader {
reader,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, Key, Value> ::capnp::traits::FromPointerReader<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a, Key, Value>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a, Key, Value> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a, Key, Value> ::capnp::traits::Imbue<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a, Key, Value> Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn reborrow(&self) -> Reader<'_, Key, Value> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_entries(
self,
) -> ::capnp::Result<
::capnp::struct_list::Reader<'a, crate::plugin_capnp::map::entry::Owned<Key, Value>>,
> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_entries(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
}
pub struct Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
builder: ::capnp::private::layout::StructBuilder<'a>,
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<'a, Key, Value> ::capnp::traits::HasStructSize for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a, Key, Value> ::capnp::traits::HasTypeId for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, Key, Value> ::capnp::traits::FromStructBuilder<'a> for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a, Key, Value> {
Builder {
builder,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, Key, Value> ::capnp::traits::ImbueMut<'a> for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a, Key, Value> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a, Key, Value> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a, Key, Value>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a, Key, Value> ::capnp::traits::SetPointerBuilder for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a, Key, Value>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a, Key, Value> Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn into_reader(self) -> Reader<'a, Key, Value> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_, Key, Value> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_, Key, Value> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_entries(
self,
) -> ::capnp::Result<
::capnp::struct_list::Builder<'a, crate::plugin_capnp::map::entry::Owned<Key, Value>>,
> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_entries(
&mut self,
value: ::capnp::struct_list::Reader<
'a,
crate::plugin_capnp::map::entry::Owned<Key, Value>,
>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_entries(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::map::entry::Owned<Key, Value>>
{
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
size,
)
}
pub fn has_entries(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
}
pub struct Pipeline<Key, Value> {
_typeless: ::capnp::any_pointer::Pipeline,
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<Key, Value> ::capnp::capability::FromTypelessPipeline for Pipeline<Key, Value> {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline<Key, Value> {
Pipeline {
_typeless: typeless,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<Key, Value> Pipeline<Key, Value>
where
Key: ::capnp::traits::Pipelined,
<Key as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline,
Value: ::capnp::traits::Pipelined,
<Value as ::capnp::traits::Pipelined>::Pipeline: ::capnp::capability::FromTypelessPipeline,
{
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 0,
pointers: 1,
};
pub const TYPE_ID: u64 = 0x9783_acc1_0be0_6fce;
}
pub mod entry {
/* Key,Value */
#[derive(Copy, Clone)]
pub struct Owned<Key, Value> {
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<'a, Key, Value> ::capnp::traits::Owned<'a> for Owned<Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, Key, Value>;
type Builder = Builder<'a, Key, Value>;
}
impl<'a, Key, Value> ::capnp::traits::OwnedStruct<'a> for Owned<Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
type Reader = Reader<'a, Key, Value>;
type Builder = Builder<'a, Key, Value>;
}
impl<Key, Value> ::capnp::traits::Pipelined for Owned<Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
type Pipeline = Pipeline<Key, Value>;
}
#[derive(Clone, Copy)]
pub struct Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
reader: ::capnp::private::layout::StructReader<'a>,
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<'a, Key, Value> ::capnp::traits::HasTypeId for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, Key, Value> ::capnp::traits::FromStructReader<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a, Key, Value> {
Reader {
reader,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, Key, Value> ::capnp::traits::FromPointerReader<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a, Key, Value>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a, Key, Value> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a, Key, Value> ::capnp::traits::Imbue<'a> for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a, Key, Value> Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn reborrow(&self) -> Reader<'_, Key, Value> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_key(self) -> ::capnp::Result<<Key as ::capnp::traits::Owned<'a>>::Reader> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_key(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_value(
self,
) -> ::capnp::Result<<Value as ::capnp::traits::Owned<'a>>::Reader> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
pub fn has_value(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
}
pub struct Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
builder: ::capnp::private::layout::StructBuilder<'a>,
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<'a, Key, Value> ::capnp::traits::HasStructSize for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a, Key, Value> ::capnp::traits::HasTypeId for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a, Key, Value> ::capnp::traits::FromStructBuilder<'a> for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn new(
builder: ::capnp::private::layout::StructBuilder<'a>,
) -> Builder<'a, Key, Value> {
Builder {
builder,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, Key, Value> ::capnp::traits::ImbueMut<'a> for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a, Key, Value> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a, Key, Value> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a, Key, Value>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a, Key, Value> ::capnp::traits::SetPointerBuilder for Reader<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a, Key, Value>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a, Key, Value> Builder<'a, Key, Value>
where
Key: for<'c> ::capnp::traits::Owned<'c>,
Value: for<'c> ::capnp::traits::Owned<'c>,
{
pub fn into_reader(self) -> Reader<'a, Key, Value> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_, Key, Value> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_, Key, Value> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_key(self) -> ::capnp::Result<<Key as ::capnp::traits::Owned<'a>>::Builder> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn initn_key(self, length: u32) -> <Key as ::capnp::traits::Owned<'a>>::Builder {
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0))
.initn_as(length)
}
#[inline]
pub fn set_key(
&mut self,
value: <Key as ::capnp::traits::Owned<'_>>::Reader,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_key(self) -> <Key as ::capnp::traits::Owned<'a>>::Builder {
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(0)).init_as()
}
pub fn has_key(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_value(
self,
) -> ::capnp::Result<<Value as ::capnp::traits::Owned<'a>>::Builder> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn initn_value(
self,
length: u32,
) -> <Value as ::capnp::traits::Owned<'a>>::Builder {
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(1))
.initn_as(length)
}
#[inline]
pub fn set_value(
&mut self,
value: <Value as ::capnp::traits::Owned<'_>>::Reader,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_value(self) -> <Value as ::capnp::traits::Owned<'a>>::Builder {
::capnp::any_pointer::Builder::new(self.builder.get_pointer_field(1)).init_as()
}
pub fn has_value(&self) -> bool {
!self.builder.get_pointer_field(1).is_null()
}
}
pub struct Pipeline<Key, Value> {
_typeless: ::capnp::any_pointer::Pipeline,
_phantom: ::core::marker::PhantomData<(Key, Value)>,
}
impl<Key, Value> ::capnp::capability::FromTypelessPipeline for Pipeline<Key, Value> {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline<Key, Value> {
Pipeline {
_typeless: typeless,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<Key, Value> Pipeline<Key, Value>
where
Key: ::capnp::traits::Pipelined,
<Key as ::capnp::traits::Pipelined>::Pipeline:
::capnp::capability::FromTypelessPipeline,
Value: ::capnp::traits::Pipelined,
<Value as ::capnp::traits::Pipelined>::Pipeline:
::capnp::capability::FromTypelessPipeline,
{
pub fn get_key(&self) -> <Key as ::capnp::traits::Pipelined>::Pipeline {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
pub fn get_value(&self) -> <Value as ::capnp::traits::Pipelined>::Pipeline {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(1))
}
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 0,
pointers: 2,
};
pub const TYPE_ID: u64 = 0xde4c_62ad_0c9f_67c3;
}
}
}
pub mod span {
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_start(self) -> u64 {
self.reader.get_data_field::<u64>(0)
}
#[inline]
pub fn get_end(self) -> u64 {
self.reader.get_data_field::<u64>(1)
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_start(self) -> u64 {
self.builder.get_data_field::<u64>(0)
}
#[inline]
pub fn set_start(&mut self, value: u64) {
self.builder.set_data_field::<u64>(0, value);
}
#[inline]
pub fn get_end(self) -> u64 {
self.builder.get_data_field::<u64>(1)
}
#[inline]
pub fn set_end(&mut self, value: u64) {
self.builder.set_data_field::<u64>(1, value);
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 2,
pointers: 0,
};
pub const TYPE_ID: u64 = 0xe8b6_78b5_d953_4593;
}
}
pub mod value {
pub use self::Which::{Bool, Float, Int, List, String, Void};
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_span(self) -> ::capnp::Result<crate::plugin_capnp::span::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_span(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
pub fn has_string(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 4 {
return false;
}
!self.reader.get_pointer_field(1).is_null()
}
pub fn has_list(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 5 {
return false;
}
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, ::capnp::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(Int(self.reader.get_data_field::<i64>(1))),
3 => ::core::result::Result::Ok(Float(self.reader.get_data_field::<f64>(1))),
4 => ::core::result::Result::Ok(String(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
),
)),
5 => ::core::result::Result::Ok(List(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_span(self) -> ::capnp::Result<crate::plugin_capnp::span::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_span(
&mut self,
value: crate::plugin_capnp::span::Reader<'_>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_span(self) -> crate::plugin_capnp::span::Builder<'a> {
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
pub fn has_span(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[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_int(&mut self, value: i64) {
self.builder.set_data_field::<u16>(0, 2);
self.builder.set_data_field::<i64>(1, value);
}
#[inline]
pub fn set_float(&mut self, value: f64) {
self.builder.set_data_field::<u16>(0, 3);
self.builder.set_data_field::<f64>(1, value);
}
#[inline]
pub fn set_string(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.set_data_field::<u16>(0, 4);
self.builder.get_pointer_field(1).set_text(value);
}
#[inline]
pub fn init_string(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.set_data_field::<u16>(0, 4);
self.builder.get_pointer_field(1).init_text(size)
}
pub fn has_string(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 4 {
return false;
}
!self.builder.get_pointer_field(1).is_null()
}
#[inline]
pub fn set_list(
&mut self,
value: ::capnp::struct_list::Reader<'a, crate::plugin_capnp::value::Owned>,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 5);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_list(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::value::Owned> {
self.builder.set_data_field::<u16>(0, 5);
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(1),
size,
)
}
pub fn has_list(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 5 {
return false;
}
!self.builder.get_pointer_field(1).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, ::capnp::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(Int(self.builder.get_data_field::<i64>(1))),
3 => ::core::result::Result::Ok(Float(self.builder.get_data_field::<f64>(1))),
4 => ::core::result::Result::Ok(String(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
),
)),
5 => ::core::result::Result::Ok(List(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_span(&self) -> crate::plugin_capnp::span::Pipeline {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 2,
pointers: 2,
};
pub const TYPE_ID: u64 = 0x92a0_59fb_5627_86a8;
}
pub enum Which<A0, A1> {
Void(()),
Bool(bool),
Int(i64),
Float(f64),
String(A0),
List(A1),
}
pub type WhichReader<'a> = Which<
::capnp::Result<::capnp::text::Reader<'a>>,
::capnp::Result<::capnp::struct_list::Reader<'a, crate::plugin_capnp::value::Owned>>,
>;
pub type WhichBuilder<'a> = Which<
::capnp::Result<::capnp::text::Builder<'a>>,
::capnp::Result<::capnp::struct_list::Builder<'a, crate::plugin_capnp::value::Owned>>,
>;
}
pub mod signature {
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_usage(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
pub fn has_usage(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_extra_usage(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
pub fn has_extra_usage(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
#[inline]
pub fn get_required_positional(
self,
) -> ::capnp::Result<::capnp::struct_list::Reader<'a, crate::plugin_capnp::argument::Owned>>
{
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(3),
::core::option::Option::None,
)
}
pub fn has_required_positional(&self) -> bool {
!self.reader.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_optional_positional(
self,
) -> ::capnp::Result<::capnp::struct_list::Reader<'a, crate::plugin_capnp::argument::Owned>>
{
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(4),
::core::option::Option::None,
)
}
pub fn has_optional_positional(&self) -> bool {
!self.reader.get_pointer_field(4).is_null()
}
#[inline]
pub fn get_rest(
self,
) -> ::capnp::Result<
crate::plugin_capnp::option::Reader<'a, crate::plugin_capnp::argument::Owned>,
> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(5),
::core::option::Option::None,
)
}
pub fn has_rest(&self) -> bool {
!self.reader.get_pointer_field(5).is_null()
}
#[inline]
pub fn get_named(
self,
) -> ::capnp::Result<::capnp::struct_list::Reader<'a, crate::plugin_capnp::flag::Owned>>
{
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(6),
::core::option::Option::None,
)
}
pub fn has_named(&self) -> bool {
!self.reader.get_pointer_field(6).is_null()
}
#[inline]
pub fn get_is_filter(self) -> bool {
self.reader.get_bool_field(0)
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(0).set_text(value);
}
#[inline]
pub fn init_name(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
pub fn has_name(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_usage(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_usage(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(1).set_text(value);
}
#[inline]
pub fn init_usage(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(1).init_text(size)
}
pub fn has_usage(&self) -> bool {
!self.builder.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_extra_usage(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_extra_usage(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(2).set_text(value);
}
#[inline]
pub fn init_extra_usage(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(2).init_text(size)
}
pub fn has_extra_usage(&self) -> bool {
!self.builder.get_pointer_field(2).is_null()
}
#[inline]
pub fn get_required_positional(
self,
) -> ::capnp::Result<::capnp::struct_list::Builder<'a, crate::plugin_capnp::argument::Owned>>
{
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(3),
::core::option::Option::None,
)
}
#[inline]
pub fn set_required_positional(
&mut self,
value: ::capnp::struct_list::Reader<'a, crate::plugin_capnp::argument::Owned>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(3),
value,
false,
)
}
#[inline]
pub fn init_required_positional(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::argument::Owned> {
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(3),
size,
)
}
pub fn has_required_positional(&self) -> bool {
!self.builder.get_pointer_field(3).is_null()
}
#[inline]
pub fn get_optional_positional(
self,
) -> ::capnp::Result<::capnp::struct_list::Builder<'a, crate::plugin_capnp::argument::Owned>>
{
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(4),
::core::option::Option::None,
)
}
#[inline]
pub fn set_optional_positional(
&mut self,
value: ::capnp::struct_list::Reader<'a, crate::plugin_capnp::argument::Owned>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(4),
value,
false,
)
}
#[inline]
pub fn init_optional_positional(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::argument::Owned> {
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(4),
size,
)
}
pub fn has_optional_positional(&self) -> bool {
!self.builder.get_pointer_field(4).is_null()
}
#[inline]
pub fn get_rest(
self,
) -> ::capnp::Result<
crate::plugin_capnp::option::Builder<'a, crate::plugin_capnp::argument::Owned>,
> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(5),
::core::option::Option::None,
)
}
#[inline]
pub fn set_rest(
&mut self,
value: crate::plugin_capnp::option::Reader<'_, crate::plugin_capnp::argument::Owned>,
) -> ::capnp::Result<()> {
<crate::plugin_capnp::option::Reader<'_,crate::plugin_capnp::argument::Owned> as ::capnp::traits::SetPointerBuilder>::set_pointer_builder(self.builder.get_pointer_field(5), value, false)
}
#[inline]
pub fn init_rest(
self,
) -> crate::plugin_capnp::option::Builder<'a, crate::plugin_capnp::argument::Owned>
{
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(5), 0)
}
pub fn has_rest(&self) -> bool {
!self.builder.get_pointer_field(5).is_null()
}
#[inline]
pub fn get_named(
self,
) -> ::capnp::Result<::capnp::struct_list::Builder<'a, crate::plugin_capnp::flag::Owned>>
{
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(6),
::core::option::Option::None,
)
}
#[inline]
pub fn set_named(
&mut self,
value: ::capnp::struct_list::Reader<'a, crate::plugin_capnp::flag::Owned>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(6),
value,
false,
)
}
#[inline]
pub fn init_named(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::flag::Owned> {
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(6),
size,
)
}
pub fn has_named(&self) -> bool {
!self.builder.get_pointer_field(6).is_null()
}
#[inline]
pub fn get_is_filter(self) -> bool {
self.builder.get_bool_field(0)
}
#[inline]
pub fn set_is_filter(&mut self, value: bool) {
self.builder.set_bool_field(0, value);
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_rest(
&self,
) -> crate::plugin_capnp::option::Pipeline<crate::plugin_capnp::argument::Owned> {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(5))
}
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 7,
};
pub const TYPE_ID: u64 = 0xec96_eeb4_8cb7_90fa;
}
}
pub mod flag {
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_long(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_long(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_short(
self,
) -> ::capnp::Result<crate::plugin_capnp::option::Reader<'a, ::capnp::text::Owned>>
{
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
pub fn has_short(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_arg(
self,
) -> ::core::result::Result<crate::plugin_capnp::Shape, ::capnp::NotInSchema> {
::capnp::traits::FromU16::from_u16(self.reader.get_data_field::<u16>(0))
}
#[inline]
pub fn get_required(self) -> bool {
self.reader.get_bool_field(16)
}
#[inline]
pub fn get_desc(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
pub fn has_desc(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_long(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_long(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(0).set_text(value);
}
#[inline]
pub fn init_long(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
pub fn has_long(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_short(
self,
) -> ::capnp::Result<crate::plugin_capnp::option::Builder<'a, ::capnp::text::Owned>>
{
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_short(
&mut self,
value: crate::plugin_capnp::option::Reader<'_, ::capnp::text::Owned>,
) -> ::capnp::Result<()> {
<crate::plugin_capnp::option::Reader<'_,::capnp::text::Owned> as ::capnp::traits::SetPointerBuilder>::set_pointer_builder(self.builder.get_pointer_field(1), value, false)
}
#[inline]
pub fn init_short(self) -> crate::plugin_capnp::option::Builder<'a, ::capnp::text::Owned> {
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), 0)
}
pub fn has_short(&self) -> bool {
!self.builder.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_arg(
self,
) -> ::core::result::Result<crate::plugin_capnp::Shape, ::capnp::NotInSchema> {
::capnp::traits::FromU16::from_u16(self.builder.get_data_field::<u16>(0))
}
#[inline]
pub fn set_arg(&mut self, value: crate::plugin_capnp::Shape) {
self.builder.set_data_field::<u16>(0, value as u16)
}
#[inline]
pub fn get_required(self) -> bool {
self.builder.get_bool_field(16)
}
#[inline]
pub fn set_required(&mut self, value: bool) {
self.builder.set_bool_field(16, value);
}
#[inline]
pub fn get_desc(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_desc(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(2).set_text(value);
}
#[inline]
pub fn init_desc(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(2).init_text(size)
}
pub fn has_desc(&self) -> bool {
!self.builder.get_pointer_field(2).is_null()
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_short(&self) -> crate::plugin_capnp::option::Pipeline<::capnp::text::Owned> {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(1))
}
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 3,
};
pub const TYPE_ID: u64 = 0xc3e5_b612_6800_e050;
}
}
pub mod argument {
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_name(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_desc(self) -> ::capnp::Result<::capnp::text::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
pub fn has_desc(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_shape(
self,
) -> ::core::result::Result<crate::plugin_capnp::Shape, ::capnp::NotInSchema> {
::capnp::traits::FromU16::from_u16(self.reader.get_data_field::<u16>(0))
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_name(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_name(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(0).set_text(value);
}
#[inline]
pub fn init_name(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(0).init_text(size)
}
pub fn has_name(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_desc(self) -> ::capnp::Result<::capnp::text::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_desc(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.get_pointer_field(1).set_text(value);
}
#[inline]
pub fn init_desc(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.get_pointer_field(1).init_text(size)
}
pub fn has_desc(&self) -> bool {
!self.builder.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_shape(
self,
) -> ::core::result::Result<crate::plugin_capnp::Shape, ::capnp::NotInSchema> {
::capnp::traits::FromU16::from_u16(self.builder.get_data_field::<u16>(0))
}
#[inline]
pub fn set_shape(&mut self, value: crate::plugin_capnp::Shape) {
self.builder.set_data_field::<u16>(0, value as u16)
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 2,
};
pub const TYPE_ID: u64 = 0xe49c_3d71_859d_47e9;
}
}
#[repr(u16)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Shape {
None = 0,
Any = 1,
String = 2,
Number = 3,
Int = 4,
Boolean = 5,
}
impl ::capnp::traits::FromU16 for Shape {
#[inline]
fn from_u16(value: u16) -> ::core::result::Result<Shape, ::capnp::NotInSchema> {
match value {
0 => ::core::result::Result::Ok(Shape::None),
1 => ::core::result::Result::Ok(Shape::Any),
2 => ::core::result::Result::Ok(Shape::String),
3 => ::core::result::Result::Ok(Shape::Number),
4 => ::core::result::Result::Ok(Shape::Int),
5 => ::core::result::Result::Ok(Shape::Boolean),
n => ::core::result::Result::Err(::capnp::NotInSchema(n)),
}
}
}
impl ::capnp::traits::ToU16 for Shape {
#[inline]
fn to_u16(self) -> u16 {
self as u16
}
}
impl ::capnp::traits::HasTypeId for Shape {
#[inline]
fn type_id() -> u64 {
0xaa46_1154_9e24_a910u64
}
}
pub mod expression {
pub use self::Which::{Bool, Float, Garbage, Int, List, String};
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
pub fn has_string(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 4 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
pub fn has_list(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 5 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, ::capnp::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Garbage(())),
1 => ::core::result::Result::Ok(Bool(self.reader.get_bool_field(16))),
2 => ::core::result::Result::Ok(Int(self.reader.get_data_field::<i64>(1))),
3 => ::core::result::Result::Ok(Float(self.reader.get_data_field::<f64>(1))),
4 => ::core::result::Result::Ok(String(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
5 => ::core::result::Result::Ok(List(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn set_garbage(&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_int(&mut self, value: i64) {
self.builder.set_data_field::<u16>(0, 2);
self.builder.set_data_field::<i64>(1, value);
}
#[inline]
pub fn set_float(&mut self, value: f64) {
self.builder.set_data_field::<u16>(0, 3);
self.builder.set_data_field::<f64>(1, value);
}
#[inline]
pub fn set_string(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.set_data_field::<u16>(0, 4);
self.builder.get_pointer_field(0).set_text(value);
}
#[inline]
pub fn init_string(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.set_data_field::<u16>(0, 4);
self.builder.get_pointer_field(0).init_text(size)
}
pub fn has_string(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 4 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn set_list(
&mut self,
value: ::capnp::struct_list::Reader<'a, crate::plugin_capnp::expression::Owned>,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 5);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_list(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::expression::Owned> {
self.builder.set_data_field::<u16>(0, 5);
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(0),
size,
)
}
pub fn has_list(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 5 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, ::capnp::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Garbage(())),
1 => ::core::result::Result::Ok(Bool(self.builder.get_bool_field(16))),
2 => ::core::result::Result::Ok(Int(self.builder.get_data_field::<i64>(1))),
3 => ::core::result::Result::Ok(Float(self.builder.get_data_field::<f64>(1))),
4 => ::core::result::Result::Ok(String(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
5 => ::core::result::Result::Ok(List(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 2,
pointers: 1,
};
pub const TYPE_ID: u64 = 0xb831_c4c2_80ed_4dbb;
}
pub enum Which<A0, A1> {
Garbage(()),
Bool(bool),
Int(i64),
Float(f64),
String(A0),
List(A1),
}
pub type WhichReader<'a> = Which<
::capnp::Result<::capnp::text::Reader<'a>>,
::capnp::Result<::capnp::struct_list::Reader<'a, crate::plugin_capnp::expression::Owned>>,
>;
pub type WhichBuilder<'a> = Which<
::capnp::Result<::capnp::text::Builder<'a>>,
::capnp::Result<::capnp::struct_list::Builder<'a, crate::plugin_capnp::expression::Owned>>,
>;
}
pub mod call {
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_head(self) -> ::capnp::Result<crate::plugin_capnp::span::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_head(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_positional(
self,
) -> ::capnp::Result<::capnp::struct_list::Reader<'a, crate::plugin_capnp::expression::Owned>>
{
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
pub fn has_positional(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_named(
self,
) -> ::capnp::Result<
crate::plugin_capnp::map::Reader<
'a,
::capnp::text::Owned,
crate::plugin_capnp::option::Owned<crate::plugin_capnp::expression::Owned>,
>,
> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(2),
::core::option::Option::None,
)
}
pub fn has_named(&self) -> bool {
!self.reader.get_pointer_field(2).is_null()
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_head(self) -> ::capnp::Result<crate::plugin_capnp::span::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_head(
&mut self,
value: crate::plugin_capnp::span::Reader<'_>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_head(self) -> crate::plugin_capnp::span::Builder<'a> {
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
pub fn has_head(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_positional(
self,
) -> ::capnp::Result<
::capnp::struct_list::Builder<'a, crate::plugin_capnp::expression::Owned>,
> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_positional(
&mut self,
value: ::capnp::struct_list::Reader<'a, crate::plugin_capnp::expression::Owned>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_positional(
self,
size: u32,
) -> ::capnp::struct_list::Builder<'a, crate::plugin_capnp::expression::Owned> {
::capnp::traits::FromPointerBuilder::init_pointer(
self.builder.get_pointer_field(1),
size,
)
}
pub fn has_positional(&self) -> bool {
!self.builder.get_pointer_field(1).is_null()
}
#[inline]
pub fn get_named(
self,
) -> ::capnp::Result<
crate::plugin_capnp::map::Builder<
'a,
::capnp::text::Owned,
crate::plugin_capnp::option::Owned<crate::plugin_capnp::expression::Owned>,
>,
> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(2),
::core::option::Option::None,
)
}
#[inline]
pub fn set_named(
&mut self,
value: crate::plugin_capnp::map::Reader<
'_,
::capnp::text::Owned,
crate::plugin_capnp::option::Owned<crate::plugin_capnp::expression::Owned>,
>,
) -> ::capnp::Result<()> {
<crate::plugin_capnp::map::Reader<
'_,
::capnp::text::Owned,
crate::plugin_capnp::option::Owned<crate::plugin_capnp::expression::Owned>,
> as ::capnp::traits::SetPointerBuilder>::set_pointer_builder(
self.builder.get_pointer_field(2),
value,
false,
)
}
#[inline]
pub fn init_named(
self,
) -> crate::plugin_capnp::map::Builder<
'a,
::capnp::text::Owned,
crate::plugin_capnp::option::Owned<crate::plugin_capnp::expression::Owned>,
> {
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(2), 0)
}
pub fn has_named(&self) -> bool {
!self.builder.get_pointer_field(2).is_null()
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_head(&self) -> crate::plugin_capnp::span::Pipeline {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
pub fn get_named(
&self,
) -> crate::plugin_capnp::map::Pipeline<
::capnp::text::Owned,
crate::plugin_capnp::option::Owned<crate::plugin_capnp::expression::Owned>,
> {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(2))
}
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 0,
pointers: 3,
};
pub const TYPE_ID: u64 = 0xf5e6_e69c_460f_37d8;
}
}
pub mod call_info {
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
#[inline]
pub fn get_call(self) -> ::capnp::Result<crate::plugin_capnp::call::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
)
}
pub fn has_call(&self) -> bool {
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_input(self) -> ::capnp::Result<crate::plugin_capnp::value::Reader<'a>> {
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(1),
::core::option::Option::None,
)
}
pub fn has_input(&self) -> bool {
!self.reader.get_pointer_field(1).is_null()
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn get_call(self) -> ::capnp::Result<crate::plugin_capnp::call::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
)
}
#[inline]
pub fn set_call(
&mut self,
value: crate::plugin_capnp::call::Reader<'_>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_call(self) -> crate::plugin_capnp::call::Builder<'a> {
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
pub fn has_call(&self) -> bool {
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn get_input(self) -> ::capnp::Result<crate::plugin_capnp::value::Builder<'a>> {
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(1),
::core::option::Option::None,
)
}
#[inline]
pub fn set_input(
&mut self,
value: crate::plugin_capnp::value::Reader<'_>,
) -> ::capnp::Result<()> {
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(1),
value,
false,
)
}
#[inline]
pub fn init_input(self) -> crate::plugin_capnp::value::Builder<'a> {
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(1), 0)
}
pub fn has_input(&self) -> bool {
!self.builder.get_pointer_field(1).is_null()
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {
pub fn get_call(&self) -> crate::plugin_capnp::call::Pipeline {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(0))
}
pub fn get_input(&self) -> crate::plugin_capnp::value::Pipeline {
::capnp::capability::FromTypelessPipeline::new(self._typeless.get_pointer_field(1))
}
}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 0,
pointers: 2,
};
pub const TYPE_ID: u64 = 0x8e03_127e_9170_7d6a;
}
}
pub mod plugin_call {
pub use self::Which::{CallInfo, Signature};
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
pub fn has_call_info(&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>, ::capnp::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Signature(())),
1 => ::core::result::Result::Ok(CallInfo(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn set_signature(&mut self, _value: ()) {
self.builder.set_data_field::<u16>(0, 0);
}
#[inline]
pub fn set_call_info(
&mut self,
value: crate::plugin_capnp::call_info::Reader<'_>,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 1);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_call_info(self) -> crate::plugin_capnp::call_info::Builder<'a> {
self.builder.set_data_field::<u16>(0, 1);
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
pub fn has_call_info(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 1 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, ::capnp::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Signature(())),
1 => ::core::result::Result::Ok(CallInfo(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 1,
};
pub const TYPE_ID: u64 = 0xde86_64b2_7f80_4db1;
}
pub enum Which<A0> {
Signature(()),
CallInfo(A0),
}
pub type WhichReader<'a> = Which<::capnp::Result<crate::plugin_capnp::call_info::Reader<'a>>>;
pub type WhichBuilder<'a> = Which<::capnp::Result<crate::plugin_capnp::call_info::Builder<'a>>>;
}
pub mod plugin_response {
pub use self::Which::{Error, Signature, Value};
#[derive(Copy, Clone)]
pub struct Owned(());
impl<'a> ::capnp::traits::Owned<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl<'a> ::capnp::traits::OwnedStruct<'a> for Owned {
type Reader = Reader<'a>;
type Builder = Builder<'a>;
}
impl ::capnp::traits::Pipelined for Owned {
type Pipeline = Pipeline;
}
#[derive(Clone, Copy)]
pub struct Reader<'a> {
reader: ::capnp::private::layout::StructReader<'a>,
}
impl<'a> ::capnp::traits::HasTypeId for Reader<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructReader<'a> for Reader<'a> {
fn new(reader: ::capnp::private::layout::StructReader<'a>) -> Reader<'a> {
Reader { reader }
}
}
impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> {
fn get_from_pointer(
reader: &::capnp::private::layout::PointerReader<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Reader<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructReader::new(
reader.get_struct(default)?,
))
}
}
impl<'a> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a> {
fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> {
self.reader
}
}
impl<'a> ::capnp::traits::Imbue<'a> for Reader<'a> {
fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) {
self.reader
.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table))
}
}
impl<'a> Reader<'a> {
pub fn reborrow(&self) -> Reader<'_> {
Reader { ..*self }
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.reader.total_size()
}
pub fn has_error(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 0 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
pub fn has_signature(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 1 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
pub fn has_value(&self) -> bool {
if self.reader.get_data_field::<u16>(0) != 2 {
return false;
}
!self.reader.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichReader<'a>, ::capnp::NotInSchema> {
match self.reader.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Error(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
1 => ::core::result::Result::Ok(Signature(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
2 => ::core::result::Result::Ok(Value(
::capnp::traits::FromPointerReader::get_from_pointer(
&self.reader.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Builder<'a> {
builder: ::capnp::private::layout::StructBuilder<'a>,
}
impl<'a> ::capnp::traits::HasStructSize for Builder<'a> {
#[inline]
fn struct_size() -> ::capnp::private::layout::StructSize {
_private::STRUCT_SIZE
}
}
impl<'a> ::capnp::traits::HasTypeId for Builder<'a> {
#[inline]
fn type_id() -> u64 {
_private::TYPE_ID
}
}
impl<'a> ::capnp::traits::FromStructBuilder<'a> for Builder<'a> {
fn new(builder: ::capnp::private::layout::StructBuilder<'a>) -> Builder<'a> {
Builder { builder }
}
}
impl<'a> ::capnp::traits::ImbueMut<'a> for Builder<'a> {
fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) {
self.builder
.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table))
}
}
impl<'a> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a> {
fn init_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
_size: u32,
) -> Builder<'a> {
::capnp::traits::FromStructBuilder::new(builder.init_struct(_private::STRUCT_SIZE))
}
fn get_from_pointer(
builder: ::capnp::private::layout::PointerBuilder<'a>,
default: ::core::option::Option<&'a [capnp::Word]>,
) -> ::capnp::Result<Builder<'a>> {
::core::result::Result::Ok(::capnp::traits::FromStructBuilder::new(
builder.get_struct(_private::STRUCT_SIZE, default)?,
))
}
}
impl<'a> ::capnp::traits::SetPointerBuilder for Reader<'a> {
fn set_pointer_builder<'b>(
pointer: ::capnp::private::layout::PointerBuilder<'b>,
value: Reader<'a>,
canonicalize: bool,
) -> ::capnp::Result<()> {
pointer.set_struct(&value.reader, canonicalize)
}
}
impl<'a> Builder<'a> {
pub fn into_reader(self) -> Reader<'a> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn reborrow(&mut self) -> Builder<'_> {
Builder { ..*self }
}
pub fn reborrow_as_reader(&self) -> Reader<'_> {
::capnp::traits::FromStructReader::new(self.builder.into_reader())
}
pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> {
self.builder.into_reader().total_size()
}
#[inline]
pub fn set_error(&mut self, value: ::capnp::text::Reader<'_>) {
self.builder.set_data_field::<u16>(0, 0);
self.builder.get_pointer_field(0).set_text(value);
}
#[inline]
pub fn init_error(self, size: u32) -> ::capnp::text::Builder<'a> {
self.builder.set_data_field::<u16>(0, 0);
self.builder.get_pointer_field(0).init_text(size)
}
pub fn has_error(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 0 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn set_signature(
&mut self,
value: crate::plugin_capnp::signature::Reader<'_>,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 1);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_signature(self) -> crate::plugin_capnp::signature::Builder<'a> {
self.builder.set_data_field::<u16>(0, 1);
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
pub fn has_signature(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 1 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn set_value(
&mut self,
value: crate::plugin_capnp::value::Reader<'_>,
) -> ::capnp::Result<()> {
self.builder.set_data_field::<u16>(0, 2);
::capnp::traits::SetPointerBuilder::set_pointer_builder(
self.builder.get_pointer_field(0),
value,
false,
)
}
#[inline]
pub fn init_value(self) -> crate::plugin_capnp::value::Builder<'a> {
self.builder.set_data_field::<u16>(0, 2);
::capnp::traits::FromPointerBuilder::init_pointer(self.builder.get_pointer_field(0), 0)
}
pub fn has_value(&self) -> bool {
if self.builder.get_data_field::<u16>(0) != 2 {
return false;
}
!self.builder.get_pointer_field(0).is_null()
}
#[inline]
pub fn which(self) -> ::core::result::Result<WhichBuilder<'a>, ::capnp::NotInSchema> {
match self.builder.get_data_field::<u16>(0) {
0 => ::core::result::Result::Ok(Error(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
1 => ::core::result::Result::Ok(Signature(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
2 => ::core::result::Result::Ok(Value(
::capnp::traits::FromPointerBuilder::get_from_pointer(
self.builder.get_pointer_field(0),
::core::option::Option::None,
),
)),
x => ::core::result::Result::Err(::capnp::NotInSchema(x)),
}
}
}
pub struct Pipeline {
_typeless: ::capnp::any_pointer::Pipeline,
}
impl ::capnp::capability::FromTypelessPipeline for Pipeline {
fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline {
Pipeline {
_typeless: typeless,
}
}
}
impl Pipeline {}
mod _private {
use capnp::private::layout;
pub const STRUCT_SIZE: layout::StructSize = layout::StructSize {
data: 1,
pointers: 1,
};
pub const TYPE_ID: u64 = 0xb9ba_b3c7_9388_b7db;
}
pub enum Which<A0, A1, A2> {
Error(A0),
Signature(A1),
Value(A2),
}
pub type WhichReader<'a> = Which<
::capnp::Result<::capnp::text::Reader<'a>>,
::capnp::Result<crate::plugin_capnp::signature::Reader<'a>>,
::capnp::Result<crate::plugin_capnp::value::Reader<'a>>,
>;
pub type WhichBuilder<'a> = Which<
::capnp::Result<::capnp::text::Builder<'a>>,
::capnp::Result<crate::plugin_capnp::signature::Builder<'a>>,
::capnp::Result<crate::plugin_capnp::value::Builder<'a>>,
>;
}