#![allow(unknown_lints)]
#![allow(clippy)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(PartialEq,Clone,Default)]
pub struct Want {
start: ::std::option::Option<u64>,
length: ::std::option::Option<u64>,
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
}
unsafe impl ::std::marker::Sync for Want {}
impl Want {
pub fn new() -> Want {
::std::default::Default::default()
}
pub fn default_instance() -> &'static Want {
static mut instance: ::protobuf::lazy::Lazy<Want> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Want,
};
unsafe {
instance.get(Want::new)
}
}
pub fn clear_start(&mut self) {
self.start = ::std::option::Option::None;
}
pub fn has_start(&self) -> bool {
self.start.is_some()
}
pub fn set_start(&mut self, v: u64) {
self.start = ::std::option::Option::Some(v);
}
pub fn get_start(&self) -> u64 {
self.start.unwrap_or(0)
}
fn get_start_for_reflect(&self) -> &::std::option::Option<u64> {
&self.start
}
fn mut_start_for_reflect(&mut self) -> &mut ::std::option::Option<u64> {
&mut self.start
}
pub fn clear_length(&mut self) {
self.length = ::std::option::Option::None;
}
pub fn has_length(&self) -> bool {
self.length.is_some()
}
pub fn set_length(&mut self, v: u64) {
self.length = ::std::option::Option::Some(v);
}
pub fn get_length(&self) -> u64 {
self.length.unwrap_or(0)
}
fn get_length_for_reflect(&self) -> &::std::option::Option<u64> {
&self.length
}
fn mut_length_for_reflect(&mut self) -> &mut ::std::option::Option<u64> {
&mut self.length
}
}
impl ::protobuf::Message for Want {
fn is_initialized(&self) -> bool {
if self.start.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.start = ::std::option::Option::Some(tmp);
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.length = ::std::option::Option::Some(tmp);
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.start {
my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.length {
my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.start {
os.write_uint64(1, v)?;
}
if let Some(v) = self.length {
os.write_uint64(2, v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
::protobuf::MessageStatic::descriptor_static(None::<Self>)
}
}
impl ::protobuf::MessageStatic for Want {
fn new() -> Want {
Want::new()
}
fn descriptor_static(_: ::std::option::Option<Want>) -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"start",
Want::get_start_for_reflect,
Want::mut_start_for_reflect,
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"length",
Want::get_length_for_reflect,
Want::mut_length_for_reflect,
));
::protobuf::reflect::MessageDescriptor::new::<Want>(
"Want",
fields,
file_descriptor_proto()
)
})
}
}
}
impl ::protobuf::Clear for Want {
fn clear(&mut self) {
self.clear_start();
self.clear_length();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Want {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Want {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\nwant.proto\"4\n\x04Want\x12\x14\n\x05start\x18\x01\x20\x02(\x04R\x05\
start\x12\x16\n\x06length\x18\x02\x20\x01(\x04R\x06length\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}